From 12fa748c49773d57f03052ef3cee4c72a2d3cdcc Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 11 May 2020 16:18:01 +0200 Subject: Move the notmodified check to middleware where it belongs Signed-off-by: Roeland Jago Douma --- tests/lib/AppFramework/Http/HttpTest.php | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'tests/lib/AppFramework/Http/HttpTest.php') diff --git a/tests/lib/AppFramework/Http/HttpTest.php b/tests/lib/AppFramework/Http/HttpTest.php index 009bb39260d..d3d23425f7c 100644 --- a/tests/lib/AppFramework/Http/HttpTest.php +++ b/tests/lib/AppFramework/Http/HttpTest.php @@ -53,38 +53,6 @@ class HttpTest extends \Test\TestCase { $this->assertEquals('HTTP/1.0 200 OK', $header); } - - public function testEtagMatchReturnsNotModified() { - $http = new Http(['HTTP_IF_NONE_MATCH' => 'hi']); - - $header = $http->getStatusHeader(Http::STATUS_OK, null, 'hi'); - $this->assertEquals('HTTP/1.1 304 Not Modified', $header); - } - - - public function testQuotedEtagMatchReturnsNotModified() { - $http = new Http(['HTTP_IF_NONE_MATCH' => '"hi"']); - - $header = $http->getStatusHeader(Http::STATUS_OK, null, 'hi'); - $this->assertEquals('HTTP/1.1 304 Not Modified', $header); - } - - - public function testLastModifiedMatchReturnsNotModified() { - $dateTime = new \DateTime(null, new \DateTimeZone('GMT')); - $dateTime->setTimestamp('12'); - - $http = new Http( - [ - 'HTTP_IF_MODIFIED_SINCE' => 'Thu, 01 Jan 1970 00:00:12 +0000'] - ); - - $header = $http->getStatusHeader(Http::STATUS_OK, $dateTime); - $this->assertEquals('HTTP/1.1 304 Not Modified', $header); - } - - - public function testTempRedirectBecomesFoundInHttp10() { $http = new Http([], 'HTTP/1.0'); -- cgit v1.2.3