Skip to content

Commit

Permalink
test for #58 Getting a proxy of an alias
Browse files Browse the repository at this point in the history
  • Loading branch information
mnapoli committed Apr 7, 2013
1 parent dd4de2a commit cd79e2d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/UnitTests/DI/ContainerTest.php
Expand Up @@ -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.
*/
Expand Down

0 comments on commit cd79e2d

Please sign in to comment.