From 55f03ef00c189ca4e03c5a1178c3d6bcd00e7b0f Mon Sep 17 00:00:00 2001 From: jrfnl Date: Mon, 18 Apr 2022 20:19:03 +0200 Subject: [PATCH] PlayNiceWithScriptsTest: wrap output expectation in condition Yet another one which fails on the notorious PHP 5.5 / Composer 1.x on Windows combination. --- tests/IntegrationTest/PlayNiceWithScriptsTest.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/IntegrationTest/PlayNiceWithScriptsTest.php b/tests/IntegrationTest/PlayNiceWithScriptsTest.php index 9efaae0c..1f967ae2 100644 --- a/tests/IntegrationTest/PlayNiceWithScriptsTest.php +++ b/tests/IntegrationTest/PlayNiceWithScriptsTest.php @@ -86,11 +86,13 @@ public function testScriptsAreNotBlockedFromRunning($command, $expectedOutputs) $this->assertSame(0, $result['exitcode'], 'Exitcode for initial composer install did not match 0'); - $this->assertStringContainsString( - Plugin::MESSAGE_RUNNING_INSTALLER, - $result['stdout'], - 'Output from initial composer install missing expected contents.' - ); + if ($this->willPluginOutputShow()) { + $this->assertStringContainsString( + Plugin::MESSAGE_RUNNING_INSTALLER, + $result['stdout'], + 'Output from initial composer install missing expected contents.' + ); + } $this->assertStringContainsString( 'post-update-cmd successfully run',