From 1dc7b079d0911039a5e2c96c20a12b248f85653e Mon Sep 17 00:00:00 2001 From: webimpress Date: Wed, 4 Sep 2019 20:10:29 +0100 Subject: [PATCH] PHPUnit 8 deprecations: replace assertContains with assertStringContainsString --- test/ComponentInstallerTest.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/ComponentInstallerTest.php b/test/ComponentInstallerTest.php index e7999b2..dc74488 100644 --- a/test/ComponentInstallerTest.php +++ b/test/ComponentInstallerTest.php @@ -737,7 +737,7 @@ public function testOnPostPackageInstallDoesNotPromptIfPackageIsAlreadyInConfigu $this->assertNull($this->installer->onPostPackageInstall($event->reveal())); $config = file_get_contents(vfsStream::url('project/config/application.config.php')); - $this->assertContains("'Some\Component'", $config); + $this->assertStringContainsString("'Some\Component'", $config); } public function testOnPostPackageInstallDoesNotPromptForWhitelistedPackages() @@ -768,7 +768,7 @@ public function testOnPostPackageInstallDoesNotPromptForWhitelistedPackages() $this->assertNull($this->installer->onPostPackageInstall($event->reveal())); $config = file_get_contents(vfsStream::url('project/config/application.config.php')); - $this->assertContains("'Some\Component'", $config); + $this->assertStringContainsString("'Some\Component'", $config); } public function testOnPostPackageInstallPromptsForConfigOptions() @@ -829,7 +829,7 @@ public function testOnPostPackageInstallPromptsForConfigOptions() $this->assertNull($this->installer->onPostPackageInstall($event->reveal())); $config = file_get_contents(vfsStream::url('project/config/application.config.php')); - $this->assertContains("'Some\Component'", $config); + $this->assertStringContainsString("'Some\Component'", $config); } public function testOnPostPackageInstallPromptsForConfigOptionsWhenDefinedAsArrays() @@ -929,8 +929,8 @@ public function testOnPostPackageInstallPromptsForConfigOptionsWhenDefinedAsArra $this->assertNull($this->installer->onPostPackageInstall($event->reveal())); $config = file_get_contents(vfsStream::url('project/config/application.config.php')); - $this->assertContains("'Some\Component'", $config); - $this->assertContains("'Other\Component'", $config); + $this->assertStringContainsString("'Some\Component'", $config); + $this->assertStringContainsString("'Other\Component'", $config); } public function testMultipleInvocationsOfOnPostPackageInstallCanPromptMultipleTimes() @@ -992,7 +992,7 @@ public function testMultipleInvocationsOfOnPostPackageInstallCanPromptMultipleTi $this->assertNull($this->installer->onPostPackageInstall($event->reveal())); $config = file_get_contents(vfsStream::url('project/config/application.config.php')); - $this->assertContains("'Some\Component'", $config); + $this->assertStringContainsString("'Some\Component'", $config); // Now do a second pass, with another package $package = $this->prophesize(PackageInterface::class); @@ -1049,7 +1049,7 @@ public function testMultipleInvocationsOfOnPostPackageInstallCanPromptMultipleTi $this->assertNull($this->installer->onPostPackageInstall($event->reveal())); $config = file_get_contents(vfsStream::url('project/config/application.config.php')); - $this->assertContains("'Other\Component'", $config); + $this->assertStringContainsString("'Other\Component'", $config); } public function testMultipleInvocationsOfOnPostPackageInstallCanReuseOptions() @@ -1111,7 +1111,7 @@ public function testMultipleInvocationsOfOnPostPackageInstallCanReuseOptions() $this->assertNull($this->installer->onPostPackageInstall($event->reveal())); $config = file_get_contents(vfsStream::url('project/config/application.config.php')); - $this->assertContains("'Some\Component'", $config); + $this->assertStringContainsString("'Some\Component'", $config); // Now do a second pass, with another package $package = $this->prophesize(PackageInterface::class); @@ -1134,7 +1134,7 @@ public function testMultipleInvocationsOfOnPostPackageInstallCanReuseOptions() $this->assertNull($this->installer->onPostPackageInstall($event->reveal())); $config = file_get_contents(vfsStream::url('project/config/application.config.php')); - $this->assertContains("'Other\Component'", $config); + $this->assertStringContainsString("'Other\Component'", $config); } public function testOnPostPackageUninstallReturnsEarlyIfEventIsNotInDevMode()