From 1939384f2aa8bcd947000113940c005072622d59 Mon Sep 17 00:00:00 2001 From: Scott Aubrey Date: Thu, 14 Jan 2016 17:05:42 +0000 Subject: [PATCH] add a test for broken use case --- test/ServiceManagerTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/ServiceManagerTest.php b/test/ServiceManagerTest.php index 716c9b91..31b9f445 100644 --- a/test/ServiceManagerTest.php +++ b/test/ServiceManagerTest.php @@ -245,6 +245,17 @@ public function testGetWithAlias() $this->assertEquals('bar', $this->serviceManager->get('baz')); } + /** + * @covers Zend\ServiceManager\ServiceManager::get + */ + public function testGetWithAliasofAliasWithCanonicalizedName() + { + $this->serviceManager->setService('Foo', 'Bar'); + $this->serviceManager->setAlias('Baz', 'Foo'); + $this->serviceManager->setAlias('Qux', 'Baz'); + $this->assertEquals('Bar', $this->serviceManager->get('Qux')); + } + /** * @covers Zend\ServiceManager\ServiceManager::get */