public function testDependentWithSequencedKeyUpdatesPrimaryObjectForeignKey() { $object = new \Test\Model\Object('Object'); $object->setData(array('name' => 'Test2', 'metadata' => 'I am some metadata')); $this->assertTrue($object->save()); $this->assertSame(1, $object->metaId); $this->assertSame('I am some metadata', $object->metadata); }
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)); }