diff --git a/tests/IntegrationTest/PlayNiceWithScriptsTest.php b/tests/IntegrationTest/PlayNiceWithScriptsTest.php index 9efaae0c..e741eb1c 100644 --- a/tests/IntegrationTest/PlayNiceWithScriptsTest.php +++ b/tests/IntegrationTest/PlayNiceWithScriptsTest.php @@ -86,15 +86,18 @@ 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.' + ); + } + $output = $this->willPluginOutputShow() ? $result['stdout'] : $result['stderr']; $this->assertStringContainsString( 'post-update-cmd successfully run', - $result['stdout'], + $output, 'Output from initial composer install missing expected contents.' );