From 3d64cb24a7a4d78531b91bce41cea8c27736a51c Mon Sep 17 00:00:00 2001 From: jrfnl Date: Thu, 14 Nov 2024 01:29:08 +0100 Subject: [PATCH] RuleInclusionAbsoluteWindowsTest: minor tweaks * 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. --- .../Ruleset/RuleInclusionAbsoluteWindowsTest.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.php b/tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.php index cba45ee399..9dd0370b28 100644 --- a/tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.php +++ b/tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.php @@ -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 { @@ -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__))); @@ -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()