create() public static method

Creates and saves a domain object, var args are passed to the constructor
public static create ( ) : DomainObject
return DomainObject
Beispiel #1
0
 public function testPrimaryKeyPersistAfterSave_Bug57()
 {
     $object = DomainObject::create(array('value' => 'llama'));
     $this->assertEquals(1, $object->id);
     $found = DomainObject::byId(1);
     $found->value = 'alpaca';
     $found->save();
     $this->assertEquals(1, $found->id);
 }