OrnoTest\ContainerTest::testExtendsThrowsExceptionWhenModifyingAnExistingSingleton PHP 메소드

testExtendsThrowsExceptionWhenModifyingAnExistingSingleton() 공개 메소드

    public function testExtendsThrowsExceptionWhenModifyingAnExistingSingleton()
    {
        $this->setExpectedException('Orno\\Di\\Exception\\ServiceNotExtendableException');
        $c = new Container();
        $c->singleton('service', 'OrnoTest\\Assets\\Baz');
        $c->get('service');
        $c->extend('service');
    }
ContainerTest