Exemplo n.º 1
0
 function setUp()
 {
     parent::setUp();
     $this->pluginMeta = new \Arrow\PluginMeta('store-plugin/store-plugin.php');
     $this->pluginMeta->defaultOptions = array('foo' => 1, 'bar' => 'two');
     $container = new Container();
     $container->object('pluginMeta', $this->pluginMeta)->factory('store', 'Arrow\\Options\\Store');
     $this->container = $container;
     $this->store = $container->lookup('store');
 }
 function test_nicops_case()
 {
     $container = new Container();
     $container->factory('house', 'Encase\\House');
     $container->object('logger', new Logger());
     $child = $container->child();
     $child->object('logger', new MagicLogger());
     $house = $child->lookup('house');
     $logger = $house->logger;
     $this->assertInstanceOf('Encase\\MagicLogger', $logger);
 }