public function testHasFilter() { $route = new Route('/', function () { }); $this->assertFalse($route->hasFilter('before.age')); $route->addFilter('before.age'); $this->assertTrue($route->hasFilter('before.age')); }
/** * * @param Route $route * @return null | mixed * */ public function filterByRoute(Route $route) { return $this->filter(function ($filter) use($route) { return $route->hasFilter($filter->getName()); }); }