protected function setUp() { $di = new DependencyInjection(); $di->set('session', function () use($di) { return new Session(); }); DI::setDefault($di); }
public function testDI() { $di = new DependencyInjection(); $hash = spl_object_hash($di); DI::setDefault($di); $afterDI = DI::getDefault(); $getHash = spl_object_hash($afterDI); $this->assertEquals($hash, $getHash); }