public function testEmitterNoMatchEvent() { $app = new Application(); // Create a route and a request which does NOT match that route $app->get('/foo/', function () { }); $request = Request::create('http://www.google.com/'); $app['emitter']->on(Router::EVENT_NO_MATCH, function (Application $app, Request $req) { $this->indicator = 1; }); $this->indicator = 0; $routerCallback = [$app['router'], 'route']; $app->processRequest($app, $request, $routerCallback); $this->assertSame(1, $this->indicator); }