1
0
mirror of synced 2025-01-18 14:31:40 +03:00

DDC-130 - fixed a bug in TestCases

This commit is contained in:
Benjamin Eberlei 2010-07-10 14:04:32 +02:00
parent bbaec5bf36
commit 722d4a38f4
2 changed files with 7 additions and 2 deletions

View File

@ -318,9 +318,11 @@ class ClassTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase
$this->_em->persist($employee2);
$this->_em->flush();
$employee1Id = $employee1->getId();
$this->_em->remove($employee1);
$this->_em->flush();
$this->assertNull($this->_em->find(get_class($employee1), $employee1->getId()));
$this->assertNull($this->_em->find(get_class($employee1), $employee1Id));
}
}

View File

@ -209,11 +209,12 @@ class ManyToManyBasicAssociationTest extends \Doctrine\Tests\OrmFunctionalTestCa
public function testRemoveUserWithManyGroups()
{
$user = $this->addCmsUserGblancoWithGroups(2);
$userId = $user->getId();
$this->_em->remove($user);
$this->_em->flush();
$newUser = $this->_em->find(get_class($user), $user->getId());
$newUser = $this->_em->find(get_class($user), $userId);
$this->assertNull($newUser);
}
@ -254,6 +255,8 @@ class ManyToManyBasicAssociationTest extends \Doctrine\Tests\OrmFunctionalTestCa
$this->_em->persist($user);
$this->_em->flush();
$this->assertNotNull($user->getId(), "User 'gblanco' should have an ID assigned after the persist()/flush() operation.");
return $user;
}
}