OrnoTest\ContainerTest::testAutoResolvesNestedDependenciesWithAliasedInterface PHP Метод

testAutoResolvesNestedDependenciesWithAliasedInterface() публичный Метод

    public function testAutoResolvesNestedDependenciesWithAliasedInterface()
    {
        $c = new Container();
        $c->add('OrnoTest\\Assets\\BazInterface', 'OrnoTest\\Assets\\Baz');
        $foo = $c->get('OrnoTest\\Assets\\Foo');
        $this->assertInstanceOf('OrnoTest\\Assets\\Foo', $foo);
        $this->assertInstanceOf('OrnoTest\\Assets\\Bar', $foo->bar);
        $this->assertInstanceOf('OrnoTest\\Assets\\Baz', $foo->bar->baz);
        $this->assertInstanceOf('OrnoTest\\Assets\\BazInterface', $foo->bar->baz);
    }
ContainerTest