public function ResponseTest::testIsValidateable in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/ResponseTest.php \Symfony\Component\HttpFoundation\Tests\ResponseTest::testIsValidateable()
File
- vendor/
symfony/ http-foundation/ Tests/ ResponseTest.php, line 246
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
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');
}