Beispiel #1
0
 public function testValidateWithCustomGetter()
 {
     $obj = new \Test\Model\Object('Test\\Mapper\\Object');
     $obj->metadata = array('one', 2, 'three', 4);
     $obj->validate();
     $this->assertFalse(in_array('metadata', $obj->errors));
 }
 public function testDependentWithSequencedKeyValidates()
 {
     $object = new \Test\Model\Object('Object');
     $object->setData(array('name' => 'Test', 'metadata' => 'Some very long string of text'));
     $this->assertTrue($object->validate(), print_r($object->errors, true));
 }