spec\Alterway\Component\Workflow\NodeSpec::it_finds_open_transition PHP Метод

it_finds_open_transition() публичный Метод

public it_finds_open_transition ( Node $node, Alterway\Component\Workflow\SpecificationInterface $true, Alterway\Component\Workflow\SpecificationInterface $false, Alterway\Component\Workflow\ContextInterface $ctx )
$node Alterway\Component\Workflow\Node
$true Alterway\Component\Workflow\SpecificationInterface
$false Alterway\Component\Workflow\SpecificationInterface
$ctx Alterway\Component\Workflow\ContextInterface
    function it_finds_open_transition(Node $node, Spec $true, Spec $false, Ctx $ctx)
    {
        $true->isSatisfiedBy($ctx)->willReturn(true);
        $false->isSatisfiedBy($ctx)->willReturn(false);
        $this->addTransition($node, $true);
        $this->addTransition($node, $false);
        $transitions = $this->getOpenTransitions($ctx);
        $transitions->shouldBeArray();
        $transitions->shouldHaveCount(1);
        $transitions[0]->shouldHaveType('Alterway\\Component\\Workflow\\Transition');
    }