File: 0007-Make-provider-functions-static-PHPUnit-11-Fix.patch

package info (click to toggle)
php-amqplib 3.7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,044 kB
  • sloc: php: 13,145; makefile: 77; sh: 27
file content (265 lines) | stat: -rw-r--r-- 8,830 bytes parent folder | download | duplicates (2)
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
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Sat, 28 Dec 2024 02:34:21 +0100
Subject: Make provider functions static (PHPUnit 11 Fix)

Bug-Debian: https://bugs.debian.org/1070517
---
 tests/Functional/Channel/ChannelTimeoutTest.php      |  2 +-
 tests/Functional/Channel/ChannelWaitTest.php         |  6 +++---
 .../Functional/Connection/ConnectionCreationTest.php |  2 +-
 tests/Functional/Connection/SSLConnectionTest.php    |  4 +++-
 tests/Unit/Channel/AMQPChannelTest.php               |  2 +-
 tests/Unit/Connection/AMQPConnectionConfigTest.php   |  2 ++
 tests/Unit/Helper/MiscHelperTest.php                 |  4 ++--
 tests/Unit/Message/AMQPMessageTest.php               |  2 +-
 tests/Unit/WireTest.php                              | 20 ++++++++++----------
 9 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/tests/Functional/Channel/ChannelTimeoutTest.php b/tests/Functional/Channel/ChannelTimeoutTest.php
index 1c991d1..eec40fc 100644
--- a/tests/Functional/Channel/ChannelTimeoutTest.php
+++ b/tests/Functional/Channel/ChannelTimeoutTest.php
@@ -78,7 +78,7 @@ class ChannelTimeoutTest extends TestCaseCompat
         call_user_func_array(array($this->channel, $operation), $args);
     }
 
-    public function provide_operations()
+    public static function provide_operations()
     {
         return array(
             array('exchange_declare', array('test_ex', 'fanout')),
diff --git a/tests/Functional/Channel/ChannelWaitTest.php b/tests/Functional/Channel/ChannelWaitTest.php
index c4a0839..9bfa99a 100644
--- a/tests/Functional/Channel/ChannelWaitTest.php
+++ b/tests/Functional/Channel/ChannelWaitTest.php
@@ -19,7 +19,7 @@ class ChannelWaitTest extends TestCase
      * @test
      * @small
      * @group signals
-     * @dataProvider provide_channels
+     * @group nophpunit11
      * @param callable $factory
      */
     public function should_wait_until_signal_by_default($factory)
@@ -69,7 +69,7 @@ class ChannelWaitTest extends TestCase
     /**
      * @test
      * @small
-     * @dataProvider provide_channels
+     * @group nophpunit11
      * @param callable $factory
      */
     public function should_throw_timeout_exception($factory)
@@ -84,7 +84,7 @@ class ChannelWaitTest extends TestCase
     /**
      * @test
      * @small
-     * @dataProvider provide_channels
+     * @group nophpunit11
      * @param callable $factory
      */
     public function should_return_instantly_non_blocking($factory)
diff --git a/tests/Functional/Connection/ConnectionCreationTest.php b/tests/Functional/Connection/ConnectionCreationTest.php
index a6fb546..ada531b 100644
--- a/tests/Functional/Connection/ConnectionCreationTest.php
+++ b/tests/Functional/Connection/ConnectionCreationTest.php
@@ -13,7 +13,7 @@ use PhpAmqpLib\Wire\AMQPWriter;
  */
 class ConnectionCreationTest extends AbstractConnectionTestCase
 {
-    public function hostDataProvider(): array
+    public static function hostDataProvider(): array
     {
         return array(
             'plain' => array(
diff --git a/tests/Functional/Connection/SSLConnectionTest.php b/tests/Functional/Connection/SSLConnectionTest.php
index d2d2542..831b3e4 100644
--- a/tests/Functional/Connection/SSLConnectionTest.php
+++ b/tests/Functional/Connection/SSLConnectionTest.php
@@ -12,6 +12,7 @@ class SSLConnectionTest extends AbstractConnectionTestCase
 {
     /**
      * @test
+     * @group nophpunit11
      * @dataProvider secure_connection_params
      */
     public function secure_connection_default_params($options)
@@ -28,6 +29,7 @@ class SSLConnectionTest extends AbstractConnectionTestCase
 
     /**
      * @test
+     * @group nophpunit11
      * @dataProvider secure_connection_params
      */
     public function secure_connection_default_params_with_keepalive($options)
@@ -36,7 +38,7 @@ class SSLConnectionTest extends AbstractConnectionTestCase
         $this->secure_connection_default_params($options);
     }
 
-    public function secure_connection_params()
+    public static function secure_connection_params()
     {
         $sets = [];
 
diff --git a/tests/Unit/Channel/AMQPChannelTest.php b/tests/Unit/Channel/AMQPChannelTest.php
index 28f6f2a..dda33e7 100644
--- a/tests/Unit/Channel/AMQPChannelTest.php
+++ b/tests/Unit/Channel/AMQPChannelTest.php
@@ -166,7 +166,7 @@ class AMQPChannelTest extends TestCase
         $this->assertFalse($secondResult);
     }
 
-    public function basic_consume_invalid_arguments_provider()
+    public static function basic_consume_invalid_arguments_provider()
     {
         return [
             [
diff --git a/tests/Unit/Connection/AMQPConnectionConfigTest.php b/tests/Unit/Connection/AMQPConnectionConfigTest.php
index 32e9bf4..7eb8ee6 100644
--- a/tests/Unit/Connection/AMQPConnectionConfigTest.php
+++ b/tests/Unit/Connection/AMQPConnectionConfigTest.php
@@ -75,6 +75,7 @@ class AMQPConnectionConfigTest extends TestCase
 
     /**
      * @test
+     * @group nophpunit11
      */
     public function secure_with_correct_crypto_method()
     {
@@ -103,6 +104,7 @@ class AMQPConnectionConfigTest extends TestCase
     }
 
     /**
+     * @group nophpunit11
      * @test
      */
     public function insecure_connection()
diff --git a/tests/Unit/Helper/MiscHelperTest.php b/tests/Unit/Helper/MiscHelperTest.php
index 74e24a3..bf28eca 100644
--- a/tests/Unit/Helper/MiscHelperTest.php
+++ b/tests/Unit/Helper/MiscHelperTest.php
@@ -33,7 +33,7 @@ class MiscHelperTest extends TestCaseCompat
         self::assertEquals('test', MiscHelper::methodSig('test'));
     }
 
-    public function splitSecondsMicrosecondsData(): array
+    public static function splitSecondsMicrosecondsData(): array
     {
         return [
             [0, [0, 0]],
@@ -50,7 +50,7 @@ class MiscHelperTest extends TestCaseCompat
         ];
     }
 
-    public function hexdumpData(): array
+    public static function hexdumpData(): array
     {
         return [
             [['FM', false, false, true], '/000\s+46 4d\s+FM/'],
diff --git a/tests/Unit/Message/AMQPMessageTest.php b/tests/Unit/Message/AMQPMessageTest.php
index 11a87c3..2d5b0a7 100644
--- a/tests/Unit/Message/AMQPMessageTest.php
+++ b/tests/Unit/Message/AMQPMessageTest.php
@@ -68,7 +68,7 @@ class AMQPMessageTest extends TestCase
         $message->getDeliveryTag();
     }
 
-    public function propertiesData()
+    public static function propertiesData()
     {
         return [
             [
diff --git a/tests/Unit/WireTest.php b/tests/Unit/WireTest.php
index ca4b991..e7aecc5 100644
--- a/tests/Unit/WireTest.php
+++ b/tests/Unit/WireTest.php
@@ -462,7 +462,7 @@ class WireTest extends TestCaseCompat
         );
     }
 
-    public function bitWrData()
+    public static function bitWrData()
     {
         return [
             [true],
@@ -470,7 +470,7 @@ class WireTest extends TestCaseCompat
         ];
     }
 
-    public function octetWrData()
+    public static function octetWrData()
     {
         $data = [];
         for ($i = 0; $i <= 255; $i++) {
@@ -480,7 +480,7 @@ class WireTest extends TestCaseCompat
         return $data;
     }
 
-    public function signedOctetWrData()
+    public static function signedOctetWrData()
     {
         $data = [];
         for ($i = -128; $i <= 127; $i++) {
@@ -490,7 +490,7 @@ class WireTest extends TestCaseCompat
         return $data;
     }
 
-    public function signedShortWrData()
+    public static function signedShortWrData()
     {
         return [
             [-32768],
@@ -500,7 +500,7 @@ class WireTest extends TestCaseCompat
         ];
     }
 
-    public function longWrData()
+    public static function longWrData()
     {
         $max = PHP_INT_SIZE === 8 ? 4294967295 : PHP_INT_MAX;
 
@@ -525,7 +525,7 @@ class WireTest extends TestCaseCompat
         ];
     }
 
-    public function signedLongWrData()
+    public static function signedLongWrData()
     {
         return [
             [-2147483648],
@@ -551,7 +551,7 @@ class WireTest extends TestCaseCompat
         ];
     }
 
-    public function longlongWrData()
+    public static function longlongWrData()
     {
         return [
             [0],
@@ -577,7 +577,7 @@ class WireTest extends TestCaseCompat
         ];
     }
 
-    public function signedLonglongWrData()
+    public static function signedLonglongWrData()
     {
         $min = defined('PHP_INT_MIN') ? PHP_INT_MIN : ~PHP_INT_MAX;
         return [
@@ -617,7 +617,7 @@ class WireTest extends TestCaseCompat
         ];
     }
 
-    public function shortstrWrData()
+    public static function shortstrWrData()
     {
         return [
             ['a'],
@@ -625,7 +625,7 @@ class WireTest extends TestCaseCompat
         ];
     }
 
-    public function longstrWrData()
+    public static function longstrWrData()
     {
         return [
             ['a'],