public function ResponseTest::testSetNotModified

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseTest.php, line 95

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());
}