File: 0005-Compatibility-with-recent-PHPUnit-12.patch

package info (click to toggle)
php-composer-spdx-licenses 1.5.8-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 356 kB
  • sloc: php: 505; makefile: 9; sh: 5
file content (60 lines) | stat: -rw-r--r-- 2,034 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Wed, 12 Feb 2025 07:55:46 +0100
Subject: Compatibility with recent PHPUnit (12)

---
 tests/SpdxLicensesTest.php | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/SpdxLicensesTest.php b/tests/SpdxLicensesTest.php
index 80df4ff..a73d045 100644
--- a/tests/SpdxLicensesTest.php
+++ b/tests/SpdxLicensesTest.php
@@ -11,6 +11,7 @@
 
 namespace Composer\Spdx;
 
+use PHPUnit\Framework\Attributes\DataProvider;
 use PHPUnit\Framework\TestCase;
 
 class SpdxLicensesTest extends TestCase
@@ -34,6 +35,7 @@ class SpdxLicensesTest extends TestCase
      * @param string|string[] $license
      * @return void
      */
+    #[DataProvider('provideValidLicenses')]
     public function testValidate($license)
     {
         $this->assertTrue($this->licenses->validate($license));
@@ -45,6 +47,7 @@ class SpdxLicensesTest extends TestCase
      * @param string|string[] $invalidLicense
      * @return void
      */
+    #[DataProvider('provideInValidLicenses')]
     public function testInvalidLicenses($invalidLicense)
     {
         $this->assertFalse($this->licenses->validate($invalidLicense));
@@ -56,6 +59,7 @@ class SpdxLicensesTest extends TestCase
      * @param mixed $invalidArgument
      * @return void
      */
+    #[DataProvider('provideInValidArgument')]
     public function testInvalidArgument($invalidArgument)
     {
         $this->expectException('\InvalidArgumentException');
@@ -90,6 +94,7 @@ class SpdxLicensesTest extends TestCase
      * @param string $file
      * @return void
      */
+    #[DataProvider('provideResourceFiles')]
     public function testResourceFilesExist($file)
     {
         $this->assertFileExists(
@@ -105,6 +110,7 @@ class SpdxLicensesTest extends TestCase
      * @param string $file
      * @return void
      */
+    #[DataProvider('provideResourceFiles')]
     public function testResourceFilesContainJson($file)
     {
         $contents = file_get_contents(SpdxLicenses::getResourcesDir() . '/' . $file);