From d9dbec3458344bb17cdd3099d1808b402dd3a76c Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 15 Apr 2021 12:06:43 +0200 Subject: [PATCH] try to fix windows compat --- tests/Console/Command/ListFilesCommandTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/Console/Command/ListFilesCommandTest.php b/tests/Console/Command/ListFilesCommandTest.php index 76bdafc4335..a2fbb61243f 100644 --- a/tests/Console/Command/ListFilesCommandTest.php +++ b/tests/Console/Command/ListFilesCommandTest.php @@ -30,7 +30,12 @@ public function testListWithConfig() $commandTester = $this->doTestExecute([ '--config' => __DIR__ . '/../../Fixtures/ListFilesTest/.php-cs-fixer.php' ]); - $this->assertSame(escapeshellarg('./tests/Fixtures/ListFilesTest/needs-fixing/needs-fixing.php').PHP_EOL, $commandTester->getDisplay()); + + $expectedPath = './tests/Fixtures/ListFilesTest/needs-fixing/needs-fixing.php'; + // make the test also work on windows + $expectedPath = str_replace('/', DIRECTORY_SEPARATOR, $expectedPath); + + $this->assertSame(escapeshellarg($expectedPath).PHP_EOL, $commandTester->getDisplay()); } /**