Esempio n. 1
0
 function it_should_allow_to_check_logical_or(Rule $left, Rule $right)
 {
     $left->check(null)->shouldBeCalled()->willReturn(false);
     $right->check(null)->shouldBeCalled()->willReturn(true);
     $this->setLeft($left);
     $this->setRight($right);
     $this->check(null)->shouldReturn(true);
 }
Esempio n. 2
0
 function it_should_allow_to_be_valid(Rule $rule)
 {
     $rule->check(1)->shouldBeCalled()->willReturn(true);
     $this->setRule($rule);
     $this->isValid(1)->shouldReturn(true);
 }