function testFilterChaining() { $this->app->map('bye', function ($name) { return "Bye, {$name}!"; }); $this->app->before('bye', function (&$params, &$output) { $params[0] = 'Bob'; }); $this->app->before('bye', function (&$params, &$output) { $params[0] = 'Fred'; return false; }); $this->app->before('bye', function (&$params, &$output) { $params[0] = 'Ted'; }); $result = $this->app->bye('Joe'); $this->assertEquals('Bye, Fred!', $result); }