File: 0004-Compatibility-with-recent-PHPUnit-8.patch

package info (click to toggle)
phpseclib 1.0.24-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,940 kB
  • sloc: php: 11,795; sh: 66; xml: 50; makefile: 21
file content (262 lines) | stat: -rw-r--r-- 10,584 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
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Wed, 14 Aug 2019 12:25:49 -1000
Subject: Compatibility with recent PHPUnit (8)

---
 tests/Functional/Net/SCPSSH2UserStoryTest.php      | 2 +-
 tests/Functional/Net/SFTPLargeFileTest.php         | 2 +-
 tests/Functional/Net/SFTPTestCase.php              | 4 ++--
 tests/Functional/Net/SFTPUserStoryTest.php         | 2 +-
 tests/Functional/Net/SSH2AgentTest.php             | 2 +-
 tests/PhpseclibFunctionalTestCase.php              | 2 +-
 tests/PhpseclibTestCase.php                        | 2 +-
 tests/Unit/Crypt/AES/McryptTest.php                | 2 +-
 tests/Unit/Crypt/AES/OpenSSLTest.php               | 2 +-
 tests/Unit/Crypt/AES/PurePHPTest.php               | 2 +-
 tests/Unit/Crypt/Hash/TestCase.php                 | 4 ++--
 tests/Unit/Math/BigInteger/BCMathTest.php          | 2 +-
 tests/Unit/Math/BigInteger/GMPTest.php             | 2 +-
 tests/Unit/Math/BigInteger/InternalOpenSSLTest.php | 2 +-
 tests/Unit/Math/BigInteger/InternalTest.php        | 2 +-
 tests/Unit/Math/BigInteger/TestCase.php            | 2 +-
 tests/Unit/Net/SFTPStreamUnitTest.php              | 2 +-
 17 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/tests/Functional/Net/SCPSSH2UserStoryTest.php b/tests/Functional/Net/SCPSSH2UserStoryTest.php
index 0837f4b..762559a 100644
--- a/tests/Functional/Net/SCPSSH2UserStoryTest.php
+++ b/tests/Functional/Net/SCPSSH2UserStoryTest.php
@@ -12,7 +12,7 @@ class Functional_Net_SCPSSH2UserStoryTest extends PhpseclibFunctionalTestCase
     protected static $exampleData;
     protected static $exampleDataLength;
 
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         parent::setUpBeforeClass();
         self::$remoteFile = uniqid('phpseclib-scp-ssh2-') . '.txt';
diff --git a/tests/Functional/Net/SFTPLargeFileTest.php b/tests/Functional/Net/SFTPLargeFileTest.php
index 36115d5..795cc59 100644
--- a/tests/Functional/Net/SFTPLargeFileTest.php
+++ b/tests/Functional/Net/SFTPLargeFileTest.php
@@ -10,7 +10,7 @@ require_once 'Crypt/Base.php';
 
 class Functional_Net_SFTPLargeFileTest extends Functional_Net_SFTPTestCase
 {
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         if (!extension_loaded('mcrypt') && !extension_loaded('openssl')) {
             self::markTestSkipped('This test depends on mcrypt or openssl for performance.');
diff --git a/tests/Functional/Net/SFTPTestCase.php b/tests/Functional/Net/SFTPTestCase.php
index 080e4f8..6710599 100644
--- a/tests/Functional/Net/SFTPTestCase.php
+++ b/tests/Functional/Net/SFTPTestCase.php
@@ -14,7 +14,7 @@ abstract class Functional_Net_SFTPTestCase extends PhpseclibFunctionalTestCase
     protected $sftp;
     protected $scratchDir;
 
-    public function setUp()
+    public function setUp(): void
     {
         parent::setUp();
         $this->scratchDir = uniqid('phpseclib-sftp-scratch-');
@@ -28,7 +28,7 @@ abstract class Functional_Net_SFTPTestCase extends PhpseclibFunctionalTestCase
         $this->assertTrue($this->sftp->chdir($this->scratchDir));
     }
 
-    public function tearDown()
+    public function tearDown(): void
     {
         if ($this->sftp) {
             $this->sftp->chdir($this->getEnv('SSH_HOME'));
diff --git a/tests/Functional/Net/SFTPUserStoryTest.php b/tests/Functional/Net/SFTPUserStoryTest.php
index 109564f..07e1bc3 100644
--- a/tests/Functional/Net/SFTPUserStoryTest.php
+++ b/tests/Functional/Net/SFTPUserStoryTest.php
@@ -13,7 +13,7 @@ class Functional_Net_SFTPUserStoryTest extends PhpseclibFunctionalTestCase
     protected static $exampleDataLength;
     protected static $buffer;
 
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         parent::setUpBeforeClass();
 
diff --git a/tests/Functional/Net/SSH2AgentTest.php b/tests/Functional/Net/SSH2AgentTest.php
index 7ba57d5..ee18ce6 100644
--- a/tests/Functional/Net/SSH2AgentTest.php
+++ b/tests/Functional/Net/SSH2AgentTest.php
@@ -8,7 +8,7 @@
 
 class Functional_Net_SSH2AgentTest extends PhpseclibFunctionalTestCase
 {
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         if (!isset($_SERVER['SSH_AUTH_SOCK'])) {
             self::markTestSkipped(
diff --git a/tests/PhpseclibFunctionalTestCase.php b/tests/PhpseclibFunctionalTestCase.php
index 0fcdf8d..14facf2 100644
--- a/tests/PhpseclibFunctionalTestCase.php
+++ b/tests/PhpseclibFunctionalTestCase.php
@@ -7,7 +7,7 @@
 
 abstract class PhpseclibFunctionalTestCase extends PhpseclibTestCase
 {
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         if (extension_loaded('runkit')) {
             if (extension_loaded('gmp')) {
diff --git a/tests/PhpseclibTestCase.php b/tests/PhpseclibTestCase.php
index f13709f..601f2f4 100644
--- a/tests/PhpseclibTestCase.php
+++ b/tests/PhpseclibTestCase.php
@@ -9,7 +9,7 @@ abstract class PhpseclibTestCase extends PHPUnit\Framework\TestCase
 {
     protected $tempFilesToUnlinkOnTearDown = array();
 
-    public function tearDown()
+    public function tearDown(): void
     {
         foreach ($this->tempFilesToUnlinkOnTearDown as $filename) {
             if (!file_exists($filename) || unlink($filename)) {
diff --git a/tests/Unit/Crypt/AES/McryptTest.php b/tests/Unit/Crypt/AES/McryptTest.php
index 41fa204..a77761f 100644
--- a/tests/Unit/Crypt/AES/McryptTest.php
+++ b/tests/Unit/Crypt/AES/McryptTest.php
@@ -7,7 +7,7 @@
 
 class Unit_Crypt_AES_McryptTest extends Unit_Crypt_AES_TestCase
 {
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->engine = CRYPT_ENGINE_MCRYPT;
     }
diff --git a/tests/Unit/Crypt/AES/OpenSSLTest.php b/tests/Unit/Crypt/AES/OpenSSLTest.php
index ddb5de6..099a3c4 100644
--- a/tests/Unit/Crypt/AES/OpenSSLTest.php
+++ b/tests/Unit/Crypt/AES/OpenSSLTest.php
@@ -7,7 +7,7 @@
 
 class Unit_Crypt_AES_OpenSSLTest extends Unit_Crypt_AES_TestCase
 {
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->engine = CRYPT_ENGINE_OPENSSL;
     }
diff --git a/tests/Unit/Crypt/AES/PurePHPTest.php b/tests/Unit/Crypt/AES/PurePHPTest.php
index 12161a9..cd31363 100644
--- a/tests/Unit/Crypt/AES/PurePHPTest.php
+++ b/tests/Unit/Crypt/AES/PurePHPTest.php
@@ -7,7 +7,7 @@
 
 class Unit_Crypt_AES_PurePHPTest extends Unit_Crypt_AES_TestCase
 {
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->engine = CRYPT_ENGINE_INTERNAL;
     }
diff --git a/tests/Unit/Crypt/Hash/TestCase.php b/tests/Unit/Crypt/Hash/TestCase.php
index df64a5d..6680ba9 100644
--- a/tests/Unit/Crypt/Hash/TestCase.php
+++ b/tests/Unit/Crypt/Hash/TestCase.php
@@ -9,14 +9,14 @@ require_once 'Crypt/Hash.php';
 
 abstract class Unit_Crypt_Hash_TestCase extends PhpseclibTestCase
 {
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         if (!defined('CRYPT_HASH_MODE')) {
             define('CRYPT_HASH_MODE', CRYPT_HASH_MODE_INTERNAL);
         }
     }
 
-    public function setUp()
+    public function setUp(): void
     {
         if (defined('CRYPT_HASH_MODE') && CRYPT_HASH_MODE !== CRYPT_HASH_MODE_INTERNAL) {
             $this->markTestSkipped(
diff --git a/tests/Unit/Math/BigInteger/BCMathTest.php b/tests/Unit/Math/BigInteger/BCMathTest.php
index 109f81d..0d8bf51 100644
--- a/tests/Unit/Math/BigInteger/BCMathTest.php
+++ b/tests/Unit/Math/BigInteger/BCMathTest.php
@@ -7,7 +7,7 @@
 
 class Unit_Math_BigInteger_BCMathTest extends Unit_Math_BigInteger_TestCase
 {
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         if (!extension_loaded('bcmath')) {
             self::markTestSkipped('BCMath extension is not available.');
diff --git a/tests/Unit/Math/BigInteger/GMPTest.php b/tests/Unit/Math/BigInteger/GMPTest.php
index 2ec2042..825a83f 100644
--- a/tests/Unit/Math/BigInteger/GMPTest.php
+++ b/tests/Unit/Math/BigInteger/GMPTest.php
@@ -7,7 +7,7 @@
 
 class Unit_Math_BigInteger_GMPTest extends Unit_Math_BigInteger_TestCase
 {
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         if (!extension_loaded('gmp')) {
             self::markTestSkipped('GNU Multiple Precision (GMP) extension is not available.');
diff --git a/tests/Unit/Math/BigInteger/InternalOpenSSLTest.php b/tests/Unit/Math/BigInteger/InternalOpenSSLTest.php
index 4b297d9..210b09c 100644
--- a/tests/Unit/Math/BigInteger/InternalOpenSSLTest.php
+++ b/tests/Unit/Math/BigInteger/InternalOpenSSLTest.php
@@ -7,7 +7,7 @@
 
 class Unit_Math_BigInteger_InternalOpenSSLTest extends Unit_Math_BigInteger_TestCase
 {
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         if (!extension_loaded('openssl')) {
             self::markTestSkipped('openssl_public_encrypt() function is not available.');
diff --git a/tests/Unit/Math/BigInteger/InternalTest.php b/tests/Unit/Math/BigInteger/InternalTest.php
index f1fcae5..23ecb65 100644
--- a/tests/Unit/Math/BigInteger/InternalTest.php
+++ b/tests/Unit/Math/BigInteger/InternalTest.php
@@ -7,7 +7,7 @@
 
 class Unit_Math_BigInteger_InternalTest extends Unit_Math_BigInteger_TestCase
 {
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         parent::setUpBeforeClass();
 
diff --git a/tests/Unit/Math/BigInteger/TestCase.php b/tests/Unit/Math/BigInteger/TestCase.php
index 292e75e..a7ef82c 100644
--- a/tests/Unit/Math/BigInteger/TestCase.php
+++ b/tests/Unit/Math/BigInteger/TestCase.php
@@ -9,7 +9,7 @@ require_once 'Math/BigInteger.php';
 
 abstract class Unit_Math_BigInteger_TestCase extends PhpseclibTestCase
 {
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         parent::setUpBeforeClass();
 
diff --git a/tests/Unit/Net/SFTPStreamUnitTest.php b/tests/Unit/Net/SFTPStreamUnitTest.php
index 663db6d..79c11e1 100644
--- a/tests/Unit/Net/SFTPStreamUnitTest.php
+++ b/tests/Unit/Net/SFTPStreamUnitTest.php
@@ -11,7 +11,7 @@ class Unit_Net_SFTPStreamUnitTest extends PhpseclibTestCase
 {
     protected $protocol = 'sftptest';
 
-    public function setUp()
+    public function setUp(): void
     {
         parent::setUp();
         if (in_array($this->protocol, stream_get_wrappers())) {