Inheritance: implements ContextInterface
 function it_can_apply_if_subrule_does_not_apply(RuleInterface $subRule, TypeContext $context)
 {
     $context->getType()->willReturn(new Type('MyNamespace', 'TypeName', []));
     $subRule->appliesToContext($context)->willReturn(false);
     $this->appliesToContext($context)->shouldReturn(false);
 }
示例#2
0
 function it_applies_the_default_rule_to_unknown_types(RuleInterface $defaultRule, TypeContext $context)
 {
     $context->getType()->willReturn(new Type('MyNamespace', 'UnknownType', []));
     $defaultRule->apply($context)->shouldBeCalled();
     $this->apply($context);
 }