Skip to content

Commit 1b50b47

Browse files
committed
Tests: remove work-arounds for @requires tags
PHPUnit supports the `@requires OSFAMILY ...` syntax since PHPUnit 7. As this new type doesn't allow for negation, the `@requires OS ^(?!WIN).*` for the `PrepareForOutputTest::testPrepareForOutput()` method needs to remain as it should run when _not_ on Windows.
1 parent 92cf10f commit 1b50b47

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Tests for the \PHP_CodeSniffer\Ruleset class using a Windows-style absolute path to include a sniff.
1818
*
1919
* @covers \PHP_CodeSniffer\Ruleset
20-
* @requires OS ^WIN.*.
20+
* @requires OSFAMILY Windows
2121
* @group Windows
2222
*/
2323
final class RuleInclusionAbsoluteWindowsTest extends TestCase

tests/Core/Util/Common/PrepareForOutputTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function testPrepareForOutput($content, $exclude, $expected, $expectedWin
4949
* @param string $expected Expected function output (unused in this test).
5050
* @param string $expectedWin Expected function output on Windows.
5151
*
52-
* @requires OS ^WIN.*.
52+
* @requires OSFAMILY Windows
5353
* @dataProvider dataPrepareForOutput
5454
*
5555
* @return void

0 commit comments

Comments
 (0)