From ccd127f5676213d57ba5fd29fc181b6a2c5972b0 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sat, 5 Mar 2022 20:44:45 +0100 Subject: [PATCH] RegisterExternalStandardsTest: stabilize test for Composer v1 on Windows with PHP 5.5 Looks like the build for one of the new PRs is failing on the Composer v1 / Windows / PHP 5.5 build, which is notorious for not always showing the output from the plugin, even though the plugin does work. This minor change should stabilize that test for that particular build. --- tests/IntegrationTest/RegisterExternalStandardsTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/IntegrationTest/RegisterExternalStandardsTest.php b/tests/IntegrationTest/RegisterExternalStandardsTest.php index 63b5e62b..f2104aa9 100644 --- a/tests/IntegrationTest/RegisterExternalStandardsTest.php +++ b/tests/IntegrationTest/RegisterExternalStandardsTest.php @@ -293,10 +293,11 @@ public function testRegisterOneStandardInSrcSubdir($phpcsVersion) $this->writeComposerJsonFile($config, static::$tempGlobalPath); // Install the dependencies and verify that the plugin has run. + $expectedStdOut = $this->willPluginOutputShow() ? 'PHP CodeSniffer Config installed_paths set to ' : null; $this->assertExecute( 'composer global install -v --no-ansi', 0, // Expected exit code. - 'PHP CodeSniffer Config installed_paths set to ', // Expectation for stdout. + $expectedStdOut, // Expectation for stdout. null, // No stderr expectation. 'Failed to install dependencies.' );