From fb0230b9d15183e3cf1a025a5d5d9d77225965e3 Mon Sep 17 00:00:00 2001 From: Jesse Donat Date: Mon, 30 Aug 2021 16:00:09 -0500 Subject: [PATCH] Fixup phpunit --- test/MockWebServer_ChangedDefault_IntegrationTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/MockWebServer_ChangedDefault_IntegrationTest.php b/test/MockWebServer_ChangedDefault_IntegrationTest.php index 85edafc..bde3f55 100644 --- a/test/MockWebServer_ChangedDefault_IntegrationTest.php +++ b/test/MockWebServer_ChangedDefault_IntegrationTest.php @@ -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 @@ -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