You are here

public function ResponseTest::testSettersAreChainable in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/ResponseTest.php \Symfony\Component\HttpFoundation\Tests\ResponseTest::testSettersAreChainable()

File

vendor/symfony/http-foundation/Tests/ResponseTest.php, line 819

Class

ResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testSettersAreChainable() {
  $response = new Response();
  $setters = array(
    'setProtocolVersion' => '1.0',
    'setCharset' => 'UTF-8',
    'setPublic' => null,
    'setPrivate' => null,
    'setDate' => new \DateTime(),
    'expire' => null,
    'setMaxAge' => 1,
    'setSharedMaxAge' => 1,
    'setTtl' => 1,
    'setClientTtl' => 1,
  );
  foreach ($setters as $setter => $arg) {
    $this
      ->assertEquals($response, $response
      ->{$setter}($arg));
  }
}