DDC-130 - fixed a bug in TestCases
This commit is contained in:
parent
bbaec5bf36
commit
722d4a38f4
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user