File
- drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseTest.php, line 28
Class
- ResponseTest
Namespace
Symfony\Component\HttpFoundation\Tests
Code
public function testIsValidateable() {
$response = new Response('', 200, array(
'Last-Modified' => $this
->createDateTimeOneHourAgo()
->format(DATE_RFC2822),
));
$this
->assertTrue($response
->isValidateable(), '->isValidateable() returns true if Last-Modified is present');
$response = new Response('', 200, array(
'ETag' => '"12345"',
));
$this
->assertTrue($response
->isValidateable(), '->isValidateable() returns true if ETag is present');
$response = new Response();
$this
->assertFalse($response
->isValidateable(), '->isValidateable() returns false when no validator is present');
}