Example #1
0
 /**
  * @dataProvider cachingHeadersProvider
  */
 public function testCachingHeaders($varnishTTL, $clientTTL, $cachingPolicy, $expectedValue, $passExpectedValue)
 {
     $this->object->setCachePolicy($cachingPolicy);
     $this->object->setCacheValidity($varnishTTL, $clientTTL);
     $cacheControlValue = $this->object->getHeader('Cache-Control')[0]['value'];
     $passCacheControlValue = $this->object->getHeader('X-Pass-Cache-Control')[0]['value'];
     $this->assertEquals($expectedValue, $cacheControlValue, 'Cache-Control header should match the expected value');
     $this->assertEquals($passExpectedValue, $passCacheControlValue, 'X-Pass-Cache-Control header should match the expected value');
 }