Skip to content

Commit

Permalink
Fixup phpunit
Browse files Browse the repository at this point in the history
  • Loading branch information
donatj committed Aug 30, 2021
1 parent 17139e2 commit fb0230b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/MockWebServer_ChangedDefault_IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function testChangingDefaultResponse() {

$content = file_get_contents($server->getServerRoot() . '/PageDoesNotExist');
$result = json_decode($content, true);
$this->assertStringContainsString('200 OK', $http_response_header[0]);
$this->assertNotFalse(stripos($http_response_header[0], '200 OK', true) );
$this->assertSame('/PageDoesNotExist', $result['PARSED_REQUEST_URI']['path']);

// try with a 404
Expand All @@ -26,8 +26,7 @@ public function testChangingDefaultResponse() {
'http' => [ 'ignore_errors' => true ] // allow reading 404s
]));

$this->assertStringContainsString('404 Not Found', $http_response_header[0]);
$this->assertContains('HTTP/1.0 404 Not Found', $http_response_header);
$this->assertNotFalse(stripos($http_response_header[0], '404 Not Found', true));
$this->assertSame("VND.DonatStudios.MockWebServer: Resource '/PageDoesNotExist' not found!\n", $content);

// try with a custom response
Expand Down

0 comments on commit fb0230b

Please sign in to comment.