diff --git a/rector.php b/rector.php index 829ec303e0f4..92636b0bfdd5 100644 --- a/rector.php +++ b/rector.php @@ -42,7 +42,6 @@ use Rector\Php71\Rector\FuncCall\CountOnNullRector; use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector; use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector; -use Rector\PHPUnit\Rector\MethodCall\AssertFalseStrposToContainsRector; use Rector\PHPUnit\Rector\MethodCall\AssertIssetToSpecificMethodRector; use Rector\PHPUnit\Set\PHPUnitSetList; use Rector\Set\ValueObject\LevelSetList; @@ -57,6 +56,7 @@ $containerConfigurator->import(SetList::DEAD_CODE); $containerConfigurator->import(LevelSetList::UP_TO_PHP_73); $containerConfigurator->import(PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD); + $containerConfigurator->import(PHPUnitSetList::PHPUNIT_80); $parameters = $containerConfigurator->parameters(); @@ -122,9 +122,6 @@ __DIR__ . '/tests/system/Entity/EntityTest.php', __DIR__ . '/tests/system/Session/SessionTest.php', ], - - // assertContains() to string can't be used in PHPUnit 9.1 - AssertFalseStrposToContainsRector::class, ]); // auto import fully qualified class names 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, 'Open
', $content); + $this->assertStringContainsString('