Skip to content

Commit edf98b8

Browse files
committed
Update DataProviderDataRuleTest.php
1 parent 71bc2c8 commit edf98b8

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tests/Rules/PHPUnit/DataProviderDataRuleTest.php

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,14 @@ public function testTrimmingArgs(): void
308308

309309
static public function provideNamedArgumentPHPUnitVersions(): iterable
310310
{
311-
return [
312-
[null],
313-
[10],
314-
[11],
315-
];
311+
yield [null]; // unknown phpunit version
312+
313+
if (PHP_VERSION_ID >= 80100) {
314+
yield [10]; // PHPUnit 10.x requires PHP 8.1+
315+
}
316+
if (PHP_VERSION_ID >= 80200) {
317+
yield [11]; // PHPUnit 11.x requires PHP 8.2+
318+
}
316319
}
317320

318321
/**
@@ -324,10 +327,6 @@ public function testNamedArgumentsInDataProviders(?int $phpunitVersion): void
324327
$this->phpunitVersion = $phpunitVersion;
325328

326329
if ($phpunitVersion >= 11) {
327-
if (PHP_VERSION_ID < 80000) {
328-
self::markTestSkipped('PHPUnit11 requires PHP 8.0+');
329-
}
330-
331330
$errors = [];
332331
} else {
333332
$errors = [

0 commit comments

Comments
 (0)