diff --git a/composer.json b/composer.json index 6d87135..f6ca1d5 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ "phpstan/phpstan-deprecation-rules": "^1.2", "phpstan/phpstan-phpunit": "^1.4", "phpstan/phpstan-strict-rules": "^1.6", - "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12.5 || ^13.3" }, "autoload": { "psr-4": { diff --git a/tests/ShapeFileTest.php b/tests/ShapeFileTest.php index 35c0e4b..3c5d8e0 100644 --- a/tests/ShapeFileTest.php +++ b/tests/ShapeFileTest.php @@ -27,6 +27,7 @@ use PhpMyAdmin\ShapeFile\ShapeFile; use PhpMyAdmin\ShapeFile\ShapeRecord; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use function count; @@ -43,6 +44,7 @@ class ShapeFileTest extends TestCase * * @dataProvider provideFiles */ + #[DataProvider('provideFiles')] public function testLoad(string $filename, int $records, ?int $parts): void { $shp = new ShapeFile(1); @@ -104,6 +106,7 @@ public static function provideFiles(): array * * @dataProvider provideErrorFiles */ + #[DataProvider('provideErrorFiles')] public function testLoadError(string $filename): void { $shp = new ShapeFile(1); @@ -319,6 +322,7 @@ public function testShapeName(): void * * @dataProvider shapes */ + #[DataProvider('shapes')] public function testShapeSaveLoad(int $type, array $points): void { $filename = './data/test_shape-' . $type . '.*'; @@ -383,6 +387,7 @@ public function testShapeSaveLoad(int $type, array $points): void * * @dataProvider shapes */ + #[DataProvider('shapes')] public function testZetShapeSaveLoad(int $type, array $points): void { $this->testShapeSaveLoad($type + 10, $points); @@ -396,6 +401,7 @@ public function testZetShapeSaveLoad(int $type, array $points): void * * @dataProvider shapes */ + #[DataProvider('shapes')] public function testMeasureShapeSaveLoad(int $type, array $points): void { $this->testShapeSaveLoad($type + 20, $points); diff --git a/tests/UtilTest.php b/tests/UtilTest.php index dc812a7..b781f34 100644 --- a/tests/UtilTest.php +++ b/tests/UtilTest.php @@ -25,6 +25,7 @@ namespace PhpMyAdminTest\ShapeFile; use PhpMyAdmin\ShapeFile\Util; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class UtilTest extends TestCase @@ -38,6 +39,7 @@ class UtilTest extends TestCase * * @dataProvider data */ + #[DataProvider('data')] public function testLoadData(string $type, $data, $expected): void { $this->assertEquals(