public function testRecursiveStandalone() { $validator = new Validator\InArray( array( 'firstDimension' => array('test', 0, 'A'), 'secondDimension' => array('value', 2, 'a') ) ); $this->assertFalse($validator->isValid('A')); $validator->setRecursive(true); $this->assertTrue($validator->isValid('A')); }
public function testRecursiveDetection() { $validator = new InArray(array('haystack' => array('firstDimension' => array('test', 0, 'A'), 'secondDimension' => array('value', 2, 'a')), 'recursive' => false)); $this->assertFalse($validator->isValid('A')); $validator->setRecursive(true); $this->assertTrue($validator->isValid('A')); }