Skip to content

Commit

Permalink
RuleInclusionAbsoluteWindowsTest: minor tweaks
Browse files Browse the repository at this point in the history
* Switching the test skipping from an inline condition to a PHPUnit annotation.
* Adding the `@group Windows` annotation to ensure this test will run for code coverage on Windows in CI.
  • Loading branch information
jrfnl committed Nov 15, 2024
1 parent f9c5f18 commit 3d64cb2
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
/**
* Tests for the \PHP_CodeSniffer\Ruleset class using a Windows-style absolute path to include a sniff.
*
* @covers \PHP_CodeSniffer\Ruleset
* @covers \PHP_CodeSniffer\Ruleset
* @requires OS ^WIN.*.
* @group Windows
*/
final class RuleInclusionAbsoluteWindowsTest extends TestCase
{
Expand Down Expand Up @@ -52,10 +54,6 @@ final class RuleInclusionAbsoluteWindowsTest extends TestCase
*/
public function initializeConfigAndRuleset()
{
if (DIRECTORY_SEPARATOR === '/') {
$this->markTestSkipped('Windows specific test');
}

$this->standard = __DIR__.'/'.basename(__FILE__, '.php').'.xml';
$repoRootDir = dirname(dirname(dirname(__DIR__)));

Expand Down Expand Up @@ -85,9 +83,7 @@ public function initializeConfigAndRuleset()
*/
public function resetRuleset()
{
if (DIRECTORY_SEPARATOR !== '/') {
file_put_contents($this->standard, $this->contents);
}
file_put_contents($this->standard, $this->contents);

}//end resetRuleset()

Expand Down

0 comments on commit 3d64cb2

Please sign in to comment.