예제 #1
0
파일: FacadeTest.php 프로젝트: mvc5/tests
 /**
  *
  */
 function test_trigger()
 {
     $app = new App(['events' => ['foo' => [function () {
         return 'bar';
     }]]]);
     Context::bind($app);
     $this->assertEquals('bar', ServiceFacade::trigger('foo'));
 }
예제 #2
0
파일: ContextTest.php 프로젝트: mvc5/tests
 /**
  *
  */
 function test_bind()
 {
     $app = new App();
     Context::bind($app);
     $this->assertEquals($app, ServiceFacade::service());
 }