You are here

public function ResponseTest::testSetNotModified 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::testSetNotModified()

File

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

Class

ResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testSetNotModified() {
  $response = new Response();
  $modified = $response
    ->setNotModified();
  $this
    ->assertObjectHasAttribute('headers', $modified);
  $this
    ->assertObjectHasAttribute('content', $modified);
  $this
    ->assertObjectHasAttribute('version', $modified);
  $this
    ->assertObjectHasAttribute('statusCode', $modified);
  $this
    ->assertObjectHasAttribute('statusText', $modified);
  $this
    ->assertObjectHasAttribute('charset', $modified);
  $this
    ->assertEquals(304, $modified
    ->getStatusCode());
}