コード例 #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());
 }