From 04e372fe2ffcaccbc474b789f413dc5926d56eba Mon Sep 17 00:00:00 2001 From: Hugo Thunnissen Date: Mon, 20 Jun 2022 16:04:21 +0200 Subject: [PATCH] Use regexp to check install command output --- tests/Composer/Test/Command/InstallCommandTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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() ); }