isSatisfiedBy() public method

Tests if the given context satisfies the specification.
public isSatisfiedBy ( Alterway\Component\Workflow\ContextInterface $context ) : boolean
$context Alterway\Component\Workflow\ContextInterface
return boolean
Example #1
0
 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');
 }