From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Sat, 18 May 2024 13:35:51 +0200
Subject: Make provider classes static (PHPUnit 11 fix)

https://bugs.debian.org/1070612
---
 tests/AssertTest.php      | 20 ++++++++++----------
 tests/ProjectCodeTest.php | 16 ++++++++--------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/tests/AssertTest.php b/tests/AssertTest.php
index 567fddf..59c9b7b 100644
--- a/tests/AssertTest.php
+++ b/tests/AssertTest.php
@@ -44,10 +44,10 @@ class AssertTest extends TestCase
      */
     public static function doTearDownAfterClass()
     {
-        @fclose(self::$resource);
+        //@fclose(self::$resource);
     }
 
-    public function getTests()
+    public static function getTests()
     {
         $resource = self::getResource();
 
@@ -603,7 +603,7 @@ class AssertTest extends TestCase
     }
 
     /**
-     * @dataProvider getTests
+     * @group nophpunit11
      */
     public function testAssert($method, $args, $success, $multibyte = false, $minVersion = null)
     {
@@ -625,7 +625,7 @@ class AssertTest extends TestCase
     }
 
     /**
-     * @dataProvider getTests
+     * @group nophpunit11
      */
     public function testNullOr($method, $args, $success, $multibyte = false, $minVersion = null)
     {
@@ -647,7 +647,7 @@ class AssertTest extends TestCase
     }
 
     /**
-     * @dataProvider getMethods
+     * @group nophpunit11
      */
     public function testNullOrAcceptsNull($method)
     {
@@ -656,7 +656,7 @@ class AssertTest extends TestCase
     }
 
     /**
-     * @dataProvider getTests
+     * @group nophpunit11
      */
     public function testAllArray($method, $args, $success, $multibyte = false, $minVersion = null)
     {
@@ -681,7 +681,7 @@ class AssertTest extends TestCase
     }
 
     /**
-     * @dataProvider getTests
+     * @group nophpunit11
      */
     public function testAllNullOrArray($method, $args, $success, $multibyte = false, $minVersion = null)
     {
@@ -713,7 +713,7 @@ class AssertTest extends TestCase
     }
 
     /**
-     * @dataProvider getTests
+     * @group nophpunit11
      */
     public function testAllTraversable($method, $args, $success, $multibyte = false, $minVersion = null)
     {
@@ -763,7 +763,7 @@ class AssertTest extends TestCase
     }
 
     /**
-     * @dataProvider getStringConversions
+     * @group nophpunit11
      */
     public function testConvertValuesToStrings($method, $args, $exceptionMessage)
     {
@@ -809,7 +809,7 @@ class AssertTest extends TestCase
     }
 
     /**
-     * @dataProvider getInvalidIsAOfCases
+     * @group nophpunit11
      */
     public function testIsAOfExceptionMessages(array $args, string $exceptionMessage): void
     {
diff --git a/tests/ProjectCodeTest.php b/tests/ProjectCodeTest.php
index 3e8ef63..a0c2fe7 100644
--- a/tests/ProjectCodeTest.php
+++ b/tests/ProjectCodeTest.php
@@ -33,7 +33,7 @@ class ProjectCodeTest extends TestCase
     }
 
     /**
-     * @dataProvider providesMethodNames
+     * @group nophpunit11
      *
      * @param string $method
      */
@@ -62,7 +62,7 @@ class ProjectCodeTest extends TestCase
     }
 
     /**
-     * @dataProvider providesMethodNames
+     * @group nophpunit11
      *
      * @param string $method
      */
@@ -86,7 +86,7 @@ class ProjectCodeTest extends TestCase
     }
 
     /**
-     * @dataProvider providesMethodNames
+     * @group nophpunit11
      *
      * @param string $method
      */
@@ -104,7 +104,7 @@ class ProjectCodeTest extends TestCase
     }
 
     /**
-     * @dataProvider provideMethods
+     * @group nophpunit11
      *
      * @param ReflectionMethod $method
      */
@@ -131,7 +131,7 @@ class ProjectCodeTest extends TestCase
     }
 
     /**
-     * @dataProvider provideMethods
+     * @group nophpunit11
      *
      * @param ReflectionMethod $method
      */
@@ -170,7 +170,7 @@ class ProjectCodeTest extends TestCase
     /**
      * @return array
      */
-    public function providesMethodNames()
+    public static function providesMethodNames()
     {
         return array_map(function ($value) {
             return array($value->getName());
@@ -180,7 +180,7 @@ class ProjectCodeTest extends TestCase
     /**
      * @return array
      */
-    public function provideMethods()
+    public static function provideMethods()
     {
         return array_map(function ($value) {
             return array($value);
@@ -190,7 +190,7 @@ class ProjectCodeTest extends TestCase
     /**
      * @return array
      */
-    private function getMethods()
+    private static function getMethods()
     {
         static $methods;
 
