Ejemplo n.º 1
0
 /**
  * @covers \ZF\HttpCache\HttpCacheListener::onRoute
  * @dataProvider configDataProvider
  *
  * @param array  $config
  * @param string $method
  * @param array  $routeMatch
  * @param array  $exCacheConfig
  */
 public function testOnRoute(array $config, $method, array $routeMatch, array $exCacheConfig)
 {
     $request = new HttpRequest();
     $request->setMethod($method);
     $event = new MvcEvent();
     $event->setRequest($request);
     $event->setRouteMatch(new RouteMatch($routeMatch));
     $this->instance->setConfig($config)->onRoute($event);
     $cacheConfig = $this->instance->getCacheConfig();
     $this->assertSame(!empty($cacheConfig), $this->instance->hasCacheConfig());
     $this->assertSame($exCacheConfig, $cacheConfig);
 }