예제 #1
0
 protected function setUp()
 {
     $di = new DependencyInjection();
     $di->set('session', function () use($di) {
         return new Session();
     });
     DI::setDefault($di);
 }
예제 #2
0
파일: DITest.php 프로젝트: ootori/aulait
 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);
 }