Skip to content

Commit 6455d82

Browse files
committed
tests: use alternate string in expectation for Windows
1 parent aff8d20 commit 6455d82

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

tests/Process/ProcessTest.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
use Ramsey\Dev\Repl\Process\Process;
99
use Ramsey\Dev\Tools\TestCase;
1010

11+
use function strcasecmp;
12+
use function substr;
13+
14+
use const PHP_OS;
15+
1116
class ProcessTest extends TestCase
1217
{
1318
public function testUseCorrectCommand(): void
@@ -21,6 +26,10 @@ public function testUseCorrectCommand(): void
2126
// @phpstan-ignore-next-line
2227
$commandLine = $process->useCorrectCommand(['foo', '--bar', '--baz']);
2328

24-
$this->assertSame("foo '--bar' '--baz'", $commandLine);
29+
if (strcasecmp(substr(PHP_OS, 0, 3), 'WIN') === 0) {
30+
$this->assertSame('foo "--bar" "--baz"', $commandLine);
31+
} else {
32+
$this->assertSame("foo '--bar' '--baz'", $commandLine);
33+
}
2534
}
2635
}

0 commit comments

Comments
 (0)