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