コード例 #1
0
ファイル: ResponseTest.php プロジェクト: rawebone/wilson
 function testSetETag()
 {
     $resp = new Response();
     $resp->setETag("abc");
     $this->assertEquals('"abc"', $resp->getHeader("ETag"));
     $resp->setETag("abc", true);
     $this->assertEquals('W/"abc"', $resp->getHeader("ETag"));
 }
コード例 #2
0
ファイル: SenderTest.php プロジェクト: rawebone/wilson
 function testCacheHitWithEtagWildcard()
 {
     $this->response->setETag("randomly_generated_etag");
     $this->request->mock(array("HTTP_IF_NONE_MATCH" => "*"));
     $this->send();
     $this->assertEquals(304, $this->response->getStatus());
 }