Skip to content

Commit

Permalink
PlayNiceWithScriptsTest: wrap output expectation in condition
Browse files Browse the repository at this point in the history
Yet another one which fails on the notorious PHP 5.5 / Composer 1.x on Windows combination.
  • Loading branch information
jrfnl committed Apr 19, 2022
1 parent a1b6e4e commit 8d39be8
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tests/IntegrationTest/PlayNiceWithScriptsTest.php
Expand Up @@ -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.'
);

Expand Down

0 comments on commit 8d39be8

Please sign in to comment.