public function testUpdateFromObjectPassesObjectThroughIfPropertyPathIsEmpty() { $object = new Author(); $object->firstName = 'Bernhard'; $field = new TestField('firstName', array('property_path' => null)); $field->updateFromObject($object); $this->assertEquals($object, $field->getData()); }
public function testUpdateFromObjectThrowsExceptionIfPropertyDoesNotExist() { $field = new TestField('foobar'); $this->setExpectedException('Symfony\\Component\\Form\\Exception\\InvalidPropertyException'); $field->updateFromObject(new Author()); }