/** * */ function test_trigger() { $app = new App(['events' => ['foo' => [function () { return 'bar'; }]]]); Context::bind($app); $this->assertEquals('bar', ServiceFacade::trigger('foo')); }
/** * */ function test_bind() { $app = new App(); Context::bind($app); $this->assertEquals($app, ServiceFacade::service()); }