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
|
else
|
||||||
{
|
{
|
||||||
$this->assertNotNull($actual[$key]);
|
$this->assertNotNull($actual[$key]);
|
||||||
$expected[$key]->resetLazyLoaders();
|
$expectedEntity = clone($expected[$key]);
|
||||||
$expected[$key]->resetMeta();
|
$actualEntity = clone($actual[$key]);
|
||||||
$actual[$key]->resetLazyLoaders();
|
$expectedEntity->resetLazyLoaders();
|
||||||
$actual[$key]->resetMeta();
|
$expectedEntity->resetMeta();
|
||||||
$this->assertEquals($expected[$key], $actual[$key]);
|
$actualEntity->resetLazyLoaders();
|
||||||
|
$actualEntity->resetMeta();
|
||||||
|
$this->assertEquals($expectedEntity, $actualEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue