Esempio n. 1
0
 public function testNotMandatoryExtraValidatorShouldPassWithAbsentKey()
 {
     $subValidator = new Length(1, 3);
     $validator = new Key('bar', $subValidator, false);
     $obj = array();
     $this->assertTrue($validator->validate($obj));
 }
Esempio n. 2
0
 public function test_not_mandatory_extra_validator_should_pass_with_absent_key()
 {
     $subValidator = new Length(1, 3);
     $validator = new Key('bar', $subValidator, false);
     $obj = array();
     $this->assertTrue($validator->validate($obj));
 }