From 01f22988b17e5b2d93438a0cc502b830d5816899 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Mon, 18 Aug 2014 15:06:37 +0200 Subject: [PATCH] #1112 - cleaning up repository test - makes assertions more clear/simpler to read --- .../Tests/ORM/Functional/EntityRepositoryTest.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php b/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php index 193497a1b..4f11adc84 100644 --- a/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php @@ -611,21 +611,17 @@ class EntityRepositoryTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->_em->getConfiguration()->setDefaultRepositoryClassName("Doctrine\Tests\Models\DDC753\DDC753InvalidRepository"); } - public function testSingleRepositoryInstanceForAnEntity() + public function testSingleRepositoryInstanceForDifferentEntityAliases() { $config = $this->_em->getConfiguration(); + $config->addEntityNamespace('Aliased', 'Doctrine\Tests\Models\CMS'); $config->addEntityNamespace('AliasedAgain', 'Doctrine\Tests\Models\CMS'); - $this->assertSame( - $this->_em->getRepository('Doctrine\Tests\Models\CMS\CmsUser'), - $this->_em->getRepository('Aliased:CmsUser') - ); + $repository = $this->_em->getRepository('Doctrine\Tests\Models\CMS\CmsUser'); - $this->assertSame( - $this->_em->getRepository('Aliased:CmsUser'), - $this->_em->getRepository('AliasedAgain:CmsUser') - ); + $this->assertSame($repository, $this->_em->getRepository('Aliased:CmsUser')); + $this->assertSame($repository, $this->_em->getRepository('AliasedAgain:CmsUser')); } /**