diff options
Diffstat (limited to 'test/DoublePointsTest.php')
| -rw-r--r-- | test/DoublePointsTest.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/DoublePointsTest.php b/test/DoublePointsTest.php index a98a5b4..f94423c 100644 --- a/test/DoublePointsTest.php +++ b/test/DoublePointsTest.php @@ -1,15 +1,13 @@ <?php +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; require_once(dirname(__FILE__) . '/../http/api-inc.php'); -class DoublePointsTest extends TestCase { +final class DoublePointsTest extends TestCase { - - /** - * @dataProvider dataGenerator - */ + #[DataProvider('dataGenerator')] public function testPointStretch($points, $players) { $params = [ 'type' => 2, @@ -32,7 +30,7 @@ class DoublePointsTest extends TestCase { $this->assertEquals($stretchFunctionResults, $doubleContestantsResults); } - public function dataGenerator() { + public static function dataGenerator() { for ($maxPoints = 10; $maxPoints <= 250; $maxPoints += 5) { for ($players = 10; $players < $maxPoints; $players += 1) { yield [$maxPoints, $players]; |
