Exemplo n.º 1
0
 public function testSaveAndLoad()
 {
     $person = new Person($this->testPersonId);
     $this->assertEquals($this->testPersonId, $person->getId());
     $address = new Address();
     $address->setAddress('test');
     $address->setPerson($person);
     $address->save();
     $id = $address->getId();
     $this->assertNotEmpty($id);
     $address = new Address($id);
     $this->assertEquals('test', $address->getAddress());
     $this->assertEquals(1, $address->getPerson_id());
 }