コード例 #1
0
ファイル: ServiceTest.php プロジェクト: recck/proem
 public function testRetrieveByProvides()
 {
     $bar = new Asset();
     $bar->set('Proem\\Service\\Asset\\Bar', function () {
         return new Bar();
     });
     $foo = new Asset();
     $foo->set('Proem\\Service\\Asset\\Foo', function () {
         return new Foo();
     });
     $am = new Manager();
     $am->set('bar', $bar)->set('foo', $foo);
     $this->assertInstanceOf('Proem\\Service\\Asset\\Template', $am->getProvided('Proem\\Service\\Asset\\Bar'));
 }