Use regexp to check install command output
continuous-integration/drone/push Build is failing Details

main
Hugo Thunnissen 2 years ago
parent e4e728bd77
commit 04e372fe2f

@ -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()
);
}

Loading…
Cancel
Save