diff --git a/tests/Composer/Test/Command/InstallCommandTest.php b/tests/Composer/Test/Command/InstallCommandTest.php index 08a9153fd..8dc1c911e 100644 --- a/tests/Composer/Test/Command/InstallCommandTest.php +++ b/tests/Composer/Test/Command/InstallCommandTest.php @@ -155,9 +155,9 @@ class InstallCommandTest extends TestCase // Confirm that dependency installation failed and system communicated // this with its exit code and text output. $this->assertNotEquals(0, $tester->getStatusCode()); - $this->assertStringContainsString( - 'is not found for package test/two', - \str_replace(PHP_EOL, '', $tester->getDisplay()) + $this->assertMatchesRegularExpression( + '/is[[:blank:]]+not[[:blank:]]+found[[:blank:]]+for[[:blank:]]+package[[:blank:]]+test\\/two/', + $tester->getDisplay() ); }