Example #1
0
 public function testUpdate()
 {
     $user = new User();
     $user->setInheritedProperty('cool');
     $user->setUsername('jon');
     $user->setPassword('changeme');
     $this->dm->persist($user);
     $this->dm->flush();
     $this->dm->clear();
     $user = $this->dm->find('Documents\\User', $user->getId());
     $user->setUsername('w00t');
     $this->dm->flush();
     $this->dm->clear();
     $user = $this->dm->find('Documents\\User', $user->getId());
     $this->assertEquals('w00t', $user->getUsername());
     $this->assertEquals('cool', $user->getInheritedProperty());
 }