Skip to content

Commit

Permalink
dont run test on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jrushlow committed Feb 7, 2024
1 parent 5a616f4 commit b20d698
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ jobs:
run: vendor/bin/simple-phpunit --version

- name: Run Tests
run: vendor/bin/simple-phpunit --filter TemplateLinter ${{ env.PHPUNIT_FLAGS }}
run: vendor/bin/simple-phpunit ${{ env.PHPUNIT_FLAGS }}
12 changes: 5 additions & 7 deletions tests/Util/TemplateLinterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,16 @@ public function testExceptionThrownIfConfigPathDoesntExist(): void

public function testPhpCsFixerVersion(): void
{
if (str_contains(strtolower(\PHP_OS), 'win')) {
$this->markTestSkipped('Test only runs on linux.');
}

$fixerPath = sprintf('%s/src/Resources/bin/php-cs-fixer-v%s.phar', \dirname(__DIR__, 2), TemplateLinter::BUNDLED_PHP_CS_FIXER_VERSION);

$process = Process::fromShellCommandline(sprintf(
'%s %s -V',
str_contains(strtolower(\PHP_OS), 'win') ? 'set PHP_CS_FIXER_IGNORE_ENV=1&' : 'PHP_CS_FIXER_IGNORE_ENV=1 ',
$fixerPath
));
$process = Process::fromShellCommandline(sprintf('%s -V', $fixerPath));

$process->run();

dump([$process->getOutput(), $process->getErrorOutput()]);

self::assertStringContainsString(TemplateLinter::BUNDLED_PHP_CS_FIXER_VERSION, $process->getOutput());
}
}

0 comments on commit b20d698

Please sign in to comment.