setCacheControlDirective() public méthode

Sets a special directive for use in the Cache-Control header, according to RFC 2616 / 14.9
public setCacheControlDirective ( string $name, string $value = null ) : void
$name string Name of the directive, for example "max-age"
$value string An optional value
Résultat void
 /**
  * @dataProvider cacheDirectivesAndExampleValues
  * @test
  */
 public function getCacheControlDirectiveReturnsTheSpecifiedDirectiveValueIfPresent($name, $value)
 {
     $headers = new Headers();
     $this->assertNull($headers->getCacheControlDirective($name));
     if ($value === true) {
         $headers->setCacheControlDirective($name);
     } else {
         $headers->setCacheControlDirective($name, $value);
     }
     $this->assertEquals($value, $headers->getCacheControlDirective($name));
 }