Exemplo n.º 1
0
 public function testUpdateObjectDoesNotUpdatePropertyIfPropertyPathIsEmpty()
 {
     $object = new Author();
     $field = new TestField('firstName', array('property_path' => null));
     $field->bind('Bernhard');
     $field->updateObject($object);
     $this->assertEquals(null, $object->firstName);
 }
Exemplo n.º 2
0
 public function testUpdateObjectThrowsExceptionIfGetterIsNotPublic()
 {
     $field = new TestField('privateSetter');
     $field->bind('foobar');
     $this->setExpectedException('Symfony\\Component\\Form\\Exception\\PropertyAccessDeniedException');
     $field->updateObject(new Author());
 }