Beispiel #1
0
 /**
  * Test Building DI
  *
  * @return void
  * @author Dan Cox
  */
 public function test_Build()
 {
     $di = new DI();
     $di->setDirectory(__DIR__);
     $di->build()->load('service');
     $this->assertInstanceOf('Service', $di->get('service'));
     $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\ContainerBuilder', $di->get('service')->getDI());
     $this->assertEquals('value', $di->param('test'));
 }
 /**
  * Setup test environment
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     $di = new DI();
     $di->setDirectory(__DIR__);
     $di->build()->load('service');
 }