Alterway\Component\Workflow\SpecificationInterface::isSatisfiedBy PHP 메소드

isSatisfiedBy() 공개 메소드

Tests if the given context satisfies the specification.
public isSatisfiedBy ( Alterway\Component\Workflow\ContextInterface $context ) : boolean
$context Alterway\Component\Workflow\ContextInterface
리턴 boolean
    public function isSatisfiedBy(ContextInterface $context);

Usage 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');
 }
SpecificationInterface