/** * @param array $routes * @param string $route * @param boolean $expectedResult * @param array $params * @param string $httpMethod * @dataProvider shouldCacheProvider */ public function testShouldCache($routes, $route, $expectedResult, $params = array(), $httpMethod = null) { $this->strategy->setRoutes($routes); $routeMatch = new RouteMatch($params); $routeMatch->setMatchedRouteName($route); $request = new Request(); if ($httpMethod !== null) { $request->setMethod($httpMethod); } $mvcEvent = new MvcEvent(); $mvcEvent->setRouteMatch($routeMatch); $mvcEvent->setRequest($request); $this->assertEquals($expectedResult, $this->strategy->shouldCache($mvcEvent)); }