diff --git a/tests/UnitTests/DI/ContainerTest.php b/tests/UnitTests/DI/ContainerTest.php index e88ab91d9..900beac2a 100644 --- a/tests/UnitTests/DI/ContainerTest.php +++ b/tests/UnitTests/DI/ContainerTest.php @@ -115,6 +115,23 @@ public function testGetWithProxy() $this->assertInstanceOf('DI\Proxy\Proxy', $container->get('stdClass', true)); } + /** + * Issue #58 + * @see https://github.com/mnapoli/PHP-DI/issues/58 + */ + public function testGetWithProxyWithAlias() + { + $container = new Container(); + $container->getConfiguration()->addDefinitions( + array( + 'foo' => array( + 'class' => 'stdClass', + ), + ) + ); + $this->assertInstanceOf('DI\Proxy\Proxy', $container->get('foo', true)); + } + /** * Tests if instantiation unlock works. We should be able to create two instances of the same class. */