Permalink
Browse files

MDL-33955 filelib: accept any HTTP 1.0 in tests

This is common with proxies like squid which don't support http
pipelining.
  • Loading branch information...
danpoltawski committed Jun 19, 2013
1 parent 1d4ae19 commit 846f6fbe00eefcb97bc098a027a0a15cb39c00bf
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/tests/filelib_test.php
@@ -105,7 +105,7 @@ public function test_download_file_content() {
$this->assertInstanceOf('stdClass', $response);
$this->assertSame('200', $response->status);
$this->assertTrue(is_array($response->headers));
$this->assertSame('HTTP/1.1 200 OK', rtrim($response->response_code));
$this->assertRegExp('|^HTTP/1\.[01] 200 OK$|', rtrim($response->response_code));
$this->assertSame($contents, $response->results);
$this->assertSame('', $response->error);
@@ -131,7 +131,7 @@ public function test_download_file_content() {
$this->assertInstanceOf('stdClass', $response);
$this->assertSame('404', $response->status);
$this->assertTrue(is_array($response->headers));
$this->assertSame('HTTP/1.1 404 Not Found', rtrim($response->response_code));
$this->assertRegExp('|^HTTP/1\.[01] 404 Not Found$|', rtrim($response->response_code));
$this->assertStringStartsWith('<!DOCTYPE', $response->results);
$this->assertSame('', $response->error);
@@ -153,7 +153,7 @@ public function test_download_file_content() {
$this->assertInstanceOf('stdClass', $response);
$this->assertSame('200', $response->status);
$this->assertTrue(is_array($response->headers));
$this->assertSame('HTTP/1.1 200 OK', rtrim($response->response_code));
$this->assertRegExp('|^HTTP/1\.[01] 200 OK$|', rtrim($response->response_code));
$this->assertSame('done', $response->results);
$this->assertSame('', $response->error);

0 comments on commit 846f6fb

Please sign in to comment.