public function testNotMandatoryExtraValidatorShouldPassWithAbsentKey() { $subValidator = new Length(1, 3); $validator = new KeyNested('bar.rab', $subValidator, false); $object = new \stdClass(); $this->assertTrue($validator->validate($object)); }