Skip to content

Commit 850beac

Browse files
committed
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.
1 parent 37c690a commit 850beac

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
/**
1717
* Tests for the \PHP_CodeSniffer\Ruleset class using a Windows-style absolute path to include a sniff.
1818
*
19-
* @covers \PHP_CodeSniffer\Ruleset
19+
* @covers \PHP_CodeSniffer\Ruleset
20+
* @requires OS ^WIN.*.
21+
* @group Windows
2022
*/
2123
final class RuleInclusionAbsoluteWindowsTest extends TestCase
2224
{
@@ -50,10 +52,6 @@ final class RuleInclusionAbsoluteWindowsTest extends TestCase
5052
*/
5153
public function setUp(): void
5254
{
53-
if (DIRECTORY_SEPARATOR === '/') {
54-
$this->markTestSkipped('Windows specific test');
55-
}
56-
5755
$this->standard = __DIR__.'/'.basename(__FILE__, '.php').'.xml';
5856
$repoRootDir = dirname(dirname(dirname(__DIR__)));
5957

@@ -81,9 +79,7 @@ public function setUp(): void
8179
*/
8280
public function tearDown(): void
8381
{
84-
if (DIRECTORY_SEPARATOR !== '/') {
85-
file_put_contents($this->standard, $this->contents);
86-
}
82+
file_put_contents($this->standard, $this->contents);
8783

8884
}//end tearDown()
8985

0 commit comments

Comments
 (0)