Fixed AssertEntitiesEqual corrupting entities
This commit is contained in:
parent
250ffb209f
commit
0d50550c43
1 changed files with 7 additions and 5 deletions
|
@ -67,11 +67,13 @@ abstract class AbstractTestCase extends \PHPUnit_Framework_TestCase
|
|||
else
|
||||
{
|
||||
$this->assertNotNull($actual[$key]);
|
||||
$expected[$key]->resetLazyLoaders();
|
||||
$expected[$key]->resetMeta();
|
||||
$actual[$key]->resetLazyLoaders();
|
||||
$actual[$key]->resetMeta();
|
||||
$this->assertEquals($expected[$key], $actual[$key]);
|
||||
$expectedEntity = clone($expected[$key]);
|
||||
$actualEntity = clone($actual[$key]);
|
||||
$expectedEntity->resetLazyLoaders();
|
||||
$expectedEntity->resetMeta();
|
||||
$actualEntity->resetLazyLoaders();
|
||||
$actualEntity->resetMeta();
|
||||
$this->assertEquals($expectedEntity, $actualEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue