diff --git a/tests/system/HTTP/ResponseTest.php b/tests/system/HTTP/ResponseTest.php index 64eab48dc0fa..b4eba4c547c9 100644 --- a/tests/system/HTTP/ResponseTest.php +++ b/tests/system/HTTP/ResponseTest.php @@ -327,7 +327,7 @@ public function testJSONWithArray() $response->setJSON($body); $this->assertSame($expected, $response->getJSON()); - $this->assertNotFalse(strpos($response->getHeaderLine('content-type'), 'application/json')); + $this->assertStringContainsString('application/json', $response->getHeaderLine('content-type')); } public function testJSONGetFromNormalBody() @@ -364,7 +364,7 @@ public function testXMLWithArray() $response->setXML($body); $this->assertSame($expected, $response->getXML()); - $this->assertNotFalse(strpos($response->getHeaderLine('content-type'), 'application/xml')); + $this->assertStringContainsString('application/xml', $response->getHeaderLine('content-type')); } public function testXMLGetFromNormalBody() diff --git a/tests/system/View/ViewTest.php b/tests/system/View/ViewTest.php index 435c4d8f9578..d740e17a4c34 100644 --- a/tests/system/View/ViewTest.php +++ b/tests/system/View/ViewTest.php @@ -316,8 +316,8 @@ public function testRenderLayoutWithInclude() $content = $view->render('extend_include'); - $this->assertNotFalse(strpos($content, '

Open

')); - $this->assertNotFalse(strpos($content, '

Hello World

')); + $this->assertStringContainsString('

Open

', $content); + $this->assertStringContainsString('

Hello World

', $content); $this->assertSame(2, substr_count($content, 'Hello World')); }