From 36bbd28b75f6ee6bc4596e306fd20feaba7f8b31 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Mon, 18 Aug 2014 15:11:39 +0200 Subject: [PATCH] #1112 - adding test to verify that leading backslash is not relevant when fetching repositories --- .../Tests/ORM/Functional/EntityRepositoryTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php b/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php index 59778b42d..705802306 100644 --- a/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php @@ -627,6 +627,17 @@ class EntityRepositoryTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->assertSame($repository, $this->_em->getRepository('AliasedAgain:CmsUser')); } + /** + * @group DDC-3257 + */ + public function testCanRetrieveRepositoryFromClassNameWithLeadingBackslash() + { + $this->assertSame( + $this->_em->getRepository('\\Doctrine\\Tests\\Models\\CMS\\CmsUser'), + $this->_em->getRepository('Doctrine\\Tests\\Models\\CMS\\CmsUser') + ); + } + /** * @group DDC-1376 *