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

package info (click to toggle)
php-hamcrest 2.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,168 kB
  • sloc: php: 6,353; makefile: 14; sh: 9
file content (320 lines) | stat: -rw-r--r-- 9,531 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Sat, 30 Aug 2025 16:39:51 +0200
Subject: Compatibility with recent PHPUnit (12)

---
 tests/Hamcrest/Core/CombinableMatcherTest.php          | 6 +++---
 tests/Hamcrest/Core/IsInstanceOfTest.php               | 6 +++---
 tests/Hamcrest/Core/SetTest.php                        | 6 +++---
 tests/Hamcrest/FeatureMatcherTest.php                  | 6 +++---
 tests/Hamcrest/MatcherAssertTest.php                   | 5 ++---
 tests/Hamcrest/StringDescriptionTest.php               | 5 ++---
 tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php  | 6 +++---
 tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php | 6 +++---
 tests/Hamcrest/Text/StringContainsInOrderTest.php      | 6 +++---
 tests/Hamcrest/Text/StringContainsTest.php             | 6 +++---
 tests/Hamcrest/Text/StringEndsWithTest.php             | 6 +++---
 tests/Hamcrest/Text/StringStartsWithTest.php           | 6 +++---
 tests/Hamcrest/Xml/HasXPathTest.php                    | 6 +++---
 13 files changed, 37 insertions(+), 39 deletions(-)

diff --git a/tests/Hamcrest/Core/CombinableMatcherTest.php b/tests/Hamcrest/Core/CombinableMatcherTest.php
index 96622ad..981bb60 100644
--- a/tests/Hamcrest/Core/CombinableMatcherTest.php
+++ b/tests/Hamcrest/Core/CombinableMatcherTest.php
@@ -1,15 +1,15 @@
 <?php
 namespace Hamcrest\Core;
 
+use PHPUnit\Framework\Attributes\Before;
+
 class CombinableMatcherTest extends \Hamcrest\AbstractMatcherTestCase
 {
 
     private $_either_3_or_4;
     private $_not_3_and_not_4;
 
-    /**
-     * @before
-     */
+    #[Before]
     protected function setUpTest()
     {
         $this->_either_3_or_4 = \Hamcrest\Core\CombinableMatcher::either(equalTo(3))->orElse(equalTo(4));
diff --git a/tests/Hamcrest/Core/IsInstanceOfTest.php b/tests/Hamcrest/Core/IsInstanceOfTest.php
index ed561c5..a054b9f 100644
--- a/tests/Hamcrest/Core/IsInstanceOfTest.php
+++ b/tests/Hamcrest/Core/IsInstanceOfTest.php
@@ -1,15 +1,15 @@
 <?php
 namespace Hamcrest\Core;
 
+use PHPUnit\Framework\Attributes\Before;
+
 class IsInstanceOfTest extends \Hamcrest\AbstractMatcherTestCase
 {
 
     private $_baseClassInstance;
     private $_subClassInstance;
 
-    /**
-     * @before
-     */
+    #[Before]
     protected function setUpTest()
     {
         $this->_baseClassInstance = new \Hamcrest\Core\SampleBaseClass('good');
diff --git a/tests/Hamcrest/Core/SetTest.php b/tests/Hamcrest/Core/SetTest.php
index bb3c712..8449496 100644
--- a/tests/Hamcrest/Core/SetTest.php
+++ b/tests/Hamcrest/Core/SetTest.php
@@ -1,15 +1,15 @@
 <?php
 namespace Hamcrest\Core;
 
+use PHPUnit\Framework\Attributes\Before;
+
 class SetTest extends \Hamcrest\AbstractMatcherTestCase
 {
 
     public static $_classProperty;
     public $_instanceProperty;
 
-    /**
-     * @before
-     */
+    #[Before]
     protected function setUpTest()
     {
         self::$_classProperty = null;
diff --git a/tests/Hamcrest/FeatureMatcherTest.php b/tests/Hamcrest/FeatureMatcherTest.php
index 4e4ad58..5483d0d 100644
--- a/tests/Hamcrest/FeatureMatcherTest.php
+++ b/tests/Hamcrest/FeatureMatcherTest.php
@@ -1,6 +1,8 @@
 <?php
 namespace Hamcrest;
 
+use PHPUnit\Framework\Attributes\Before;
+
 class Thingy
 {
     private $_result;
@@ -34,9 +36,7 @@ class FeatureMatcherTest extends \Hamcrest\AbstractMatcherTestCase
 
     private $_resultMatcher;
 
-    /**
-     * @before
-     */
+    #[Before]
     protected function setUpTest()
     {
         $this->_resultMatcher = $this->_resultMatcher();
diff --git a/tests/Hamcrest/MatcherAssertTest.php b/tests/Hamcrest/MatcherAssertTest.php
index e349198..ccd26e9 100644
--- a/tests/Hamcrest/MatcherAssertTest.php
+++ b/tests/Hamcrest/MatcherAssertTest.php
@@ -1,14 +1,13 @@
 <?php
 namespace Hamcrest;
 
+use PHPUnit\Framework\Attributes\Before;
 use PHPUnit\Framework\TestCase;
 
 class MatcherAssertTest extends TestCase
 {
 
-    /**
-     * @before
-     */
+    #[Before]
     protected function setUpTest()
     {
         \Hamcrest\MatcherAssert::resetCount();
diff --git a/tests/Hamcrest/StringDescriptionTest.php b/tests/Hamcrest/StringDescriptionTest.php
index b42b9b4..414a6b6 100644
--- a/tests/Hamcrest/StringDescriptionTest.php
+++ b/tests/Hamcrest/StringDescriptionTest.php
@@ -1,6 +1,7 @@
 <?php
 namespace Hamcrest;
 
+use PHPUnit\Framework\Attributes\Before;
 use PHPUnit\Framework\TestCase;
 
 class SampleSelfDescriber implements \Hamcrest\SelfDescribing
@@ -23,9 +24,7 @@ class StringDescriptionTest extends TestCase
 
     private $_description;
 
-    /**
-     * @before
-     */
+    #[Before]
     protected function setUpTest()
     {
         $this->_description = new \Hamcrest\StringDescription();
diff --git a/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php b/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php
index 4a9ce68..536586c 100644
--- a/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php
+++ b/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php
@@ -1,14 +1,14 @@
 <?php
 namespace Hamcrest\Text;
 
+use PHPUnit\Framework\Attributes\Before;
+
 class IsEqualIgnoringWhiteSpaceTest extends \Hamcrest\AbstractMatcherTestCase
 {
 
     private $_matcher;
 
-    /**
-     * @before
-     */
+    #[Before]
     protected function setUpTest()
     {
         $this->_matcher = \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace(
diff --git a/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php b/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php
index 1700d5d..692a25d 100644
--- a/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php
+++ b/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php
@@ -1,6 +1,8 @@
 <?php
 namespace Hamcrest\Text;
 
+use PHPUnit\Framework\Attributes\Before;
+
 class StringContainsIgnoringCaseTest extends \Hamcrest\AbstractMatcherTestCase
 {
 
@@ -8,9 +10,7 @@ class StringContainsIgnoringCaseTest extends \Hamcrest\AbstractMatcherTestCase
 
     private $_stringContains;
 
-    /**
-     * @before
-     */
+    #[Before]
     protected function setUpTest()
     {
         $this->_stringContains = \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase(
diff --git a/tests/Hamcrest/Text/StringContainsInOrderTest.php b/tests/Hamcrest/Text/StringContainsInOrderTest.php
index 45b8315..03d9c9d 100644
--- a/tests/Hamcrest/Text/StringContainsInOrderTest.php
+++ b/tests/Hamcrest/Text/StringContainsInOrderTest.php
@@ -1,14 +1,14 @@
 <?php
 namespace Hamcrest\Text;
 
+use PHPUnit\Framework\Attributes\Before;
+
 class StringContainsInOrderTest extends \Hamcrest\AbstractMatcherTestCase
 {
 
     private $_m;
 
-    /**
-     * @before
-     */
+    #[Before]
     protected function setUpTest()
     {
         $this->_m = \Hamcrest\Text\StringContainsInOrder::stringContainsInOrder(array('a', 'b', 'c'));
diff --git a/tests/Hamcrest/Text/StringContainsTest.php b/tests/Hamcrest/Text/StringContainsTest.php
index 79d776c..cd31e7c 100644
--- a/tests/Hamcrest/Text/StringContainsTest.php
+++ b/tests/Hamcrest/Text/StringContainsTest.php
@@ -1,6 +1,8 @@
 <?php
 namespace Hamcrest\Text;
 
+use PHPUnit\Framework\Attributes\Before;
+
 class StringContainsTest extends \Hamcrest\AbstractMatcherTestCase
 {
 
@@ -8,9 +10,7 @@ class StringContainsTest extends \Hamcrest\AbstractMatcherTestCase
 
     private $_stringContains;
 
-    /**
-     * @before
-     */
+    #[Before]
     protected function setUpTest()
     {
         $this->_stringContains = \Hamcrest\Text\StringContains::containsString(self::EXCERPT);
diff --git a/tests/Hamcrest/Text/StringEndsWithTest.php b/tests/Hamcrest/Text/StringEndsWithTest.php
index 7d0044f..fb8ca48 100644
--- a/tests/Hamcrest/Text/StringEndsWithTest.php
+++ b/tests/Hamcrest/Text/StringEndsWithTest.php
@@ -1,6 +1,8 @@
 <?php
 namespace Hamcrest\Text;
 
+use PHPUnit\Framework\Attributes\Before;
+
 class StringEndsWithTest extends \Hamcrest\AbstractMatcherTestCase
 {
 
@@ -8,9 +10,7 @@ class StringEndsWithTest extends \Hamcrest\AbstractMatcherTestCase
 
     private $_stringEndsWith;
 
-    /**
-     * @before
-     */
+    #[Before]
     protected function setUpTest()
     {
         $this->_stringEndsWith = \Hamcrest\Text\StringEndsWith::endsWith(self::EXCERPT);
diff --git a/tests/Hamcrest/Text/StringStartsWithTest.php b/tests/Hamcrest/Text/StringStartsWithTest.php
index 97581bf..46b9d79 100644
--- a/tests/Hamcrest/Text/StringStartsWithTest.php
+++ b/tests/Hamcrest/Text/StringStartsWithTest.php
@@ -1,6 +1,8 @@
 <?php
 namespace Hamcrest\Text;
 
+use PHPUnit\Framework\Attributes\Before;
+
 class StringStartsWithTest extends \Hamcrest\AbstractMatcherTestCase
 {
 
@@ -8,9 +10,7 @@ class StringStartsWithTest extends \Hamcrest\AbstractMatcherTestCase
 
     private $_stringStartsWith;
 
-    /**
-     * @before
-     */
+    #[Before]
     protected function setUpTest()
     {
         $this->_stringStartsWith = \Hamcrest\Text\StringStartsWith::startsWith(self::EXCERPT);
diff --git a/tests/Hamcrest/Xml/HasXPathTest.php b/tests/Hamcrest/Xml/HasXPathTest.php
index eba2081..0c6adaf 100644
--- a/tests/Hamcrest/Xml/HasXPathTest.php
+++ b/tests/Hamcrest/Xml/HasXPathTest.php
@@ -1,15 +1,15 @@
 <?php
 namespace Hamcrest\Xml;
 
+use PHPUnit\Framework\Attributes\BeforeClass;
+
 class HasXPathTest extends \Hamcrest\AbstractMatcherTestCase
 {
     protected static $xml;
     protected static $doc;
     protected static $html;
 
-    /**
-     * @beforeClass
-     */
+    #[BeforeClass]
     public static function setUpBeforeClassTest()
     {
         self::$xml = <<<XML