From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Wed, 12 Mar 2025 08:43:01 +0100
Subject: Modernize PHPUnit syntax

---
 tests/ShapeFileTest.php | 16 ++++++----------
 tests/UtilTest.php      |  4 ++--
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/tests/ShapeFileTest.php b/tests/ShapeFileTest.php
index 505825b..d4defd5 100644
--- a/tests/ShapeFileTest.php
+++ b/tests/ShapeFileTest.php
@@ -27,6 +27,7 @@ namespace PhpMyAdminTest\ShapeFile;
 
 use PhpMyAdmin\ShapeFile\ShapeFile;
 use PhpMyAdmin\ShapeFile\ShapeRecord;
+use PHPUnit\Framework\Attributes\DataProvider;
 use PHPUnit\Framework\TestCase;
 
 use function count;
@@ -40,9 +41,8 @@ class ShapeFileTest extends TestCase
      * @param string   $filename Name of file
      * @param int      $records  Expected number of records
      * @param int|null $parts    Expected number of parts in first record
-     *
-     * @dataProvider provideFiles
      */
+    #[DataProvider('provideFiles')]
     public function testLoad(string $filename, int $records, ?int $parts): void
     {
         $shp = new ShapeFile(1);
@@ -101,9 +101,8 @@ class ShapeFileTest extends TestCase
      * Test error handling in loader.
      *
      * @param string $filename name to load
-     *
-     * @dataProvider provideErrorFiles
      */
+    #[DataProvider('provideErrorFiles')]
     public function testLoadError(string $filename): void
     {
         $shp = new ShapeFile(1);
@@ -316,9 +315,8 @@ class ShapeFileTest extends TestCase
      *
      * @param int   $type   Shape type
      * @param array $points Points
-     *
-     * @dataProvider shapes
      */
+    #[DataProvider('shapes')]
     public function testShapeSaveLoad(int $type, array $points): void
     {
         $filename = './data/test_shape-' . $type . '.*';
@@ -380,9 +378,8 @@ class ShapeFileTest extends TestCase
      *
      * @param int   $type   Shape type
      * @param array $points Points
-     *
-     * @dataProvider shapes
      */
+    #[DataProvider('shapes')]
     public function testZetShapeSaveLoad(int $type, array $points): void
     {
         $this->testShapeSaveLoad($type + 10, $points);
@@ -393,9 +390,8 @@ class ShapeFileTest extends TestCase
      *
      * @param int   $type   Shape type
      * @param array $points Points
-     *
-     * @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..3ac6a63 100644
--- a/tests/UtilTest.php
+++ b/tests/UtilTest.php
@@ -25,6 +25,7 @@ declare(strict_types=1);
 namespace PhpMyAdminTest\ShapeFile;
 
 use PhpMyAdmin\ShapeFile\Util;
+use PHPUnit\Framework\Attributes\DataProvider;
 use PHPUnit\Framework\TestCase;
 
 class UtilTest extends TestCase
@@ -35,9 +36,8 @@ class UtilTest extends TestCase
      * @param string       $type     Data type
      * @param string|false $data     Data to parse
      * @param string|false $expected Expected result
-     *
-     * @dataProvider data
      */
+    #[DataProvider('data')]
     public function testLoadData(string $type, $data, $expected): void
     {
         $this->assertEquals(
