Skip to content

Commit

Permalink
Merge branch 'master' of http://github.com/jwage/odm
Browse files Browse the repository at this point in the history
  • Loading branch information
avalanche123 committed May 17, 2010
2 parents e16b1f8 + ef603c6 commit a11190f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/PersistingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,26 @@ public function testCascadeInsertUpdateAndRemove()
$this->dm->clear();
}

public function testUpdate()
{
$user = new User();
$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());
}

public function testDetach()
{
$user = new User();
Expand Down

0 comments on commit a11190f

Please sign in to comment.