File: 0005-Compatibility-with-recent-PHPUnit-9.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 (48 lines) | stat: -rw-r--r-- 2,388 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
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Tue, 28 Dec 2021 07:55:48 -0400
Subject: Compatibility with recent PHPUnit (9)

---
 tests/PhpseclibTestCase.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/PhpseclibTestCase.php b/tests/PhpseclibTestCase.php
index 601f2f4..291dd6d 100644
--- a/tests/PhpseclibTestCase.php
+++ b/tests/PhpseclibTestCase.php
@@ -103,7 +103,7 @@ abstract class PhpseclibTestCase extends PHPUnit\Framework\TestCase
     }
 
     // assertIsArray was not introduced until PHPUnit 8
-    public static function assertIsArray($actual, $message = '')
+    public static function assertIsArray($actual, string $message = ''): void
     {
         if (method_exists('\PHPUnit\Framework\TestCase', 'assertIsArray')) {
             parent::assertIsArray($actual, $message);
@@ -114,7 +114,7 @@ abstract class PhpseclibTestCase extends PHPUnit\Framework\TestCase
     }
 
     // assertIsString was not introduced until PHPUnit 8
-    public static function assertIsString($actual, $message = '')
+    public static function assertIsString($actual, string $message = ''): void
     {
         if (method_exists('\PHPUnit\Framework\TestCase', 'assertIsString')) {
             parent::assertIsString($actual, $message);
@@ -125,7 +125,7 @@ abstract class PhpseclibTestCase extends PHPUnit\Framework\TestCase
     }
 
     // assertContains is deprecated for strings in PHPUnit 8
-    public static function assertStringContainsString($needle, $haystack, $message = '')
+    public static function assertStringContainsString(string $needle, string $haystack, string $message = ''): void
     {
         if (method_exists('\PHPUnit\Framework\TestCase', 'assertStringContainsString')) {
             parent::assertStringContainsString($needle, $haystack, $message);
@@ -136,7 +136,7 @@ abstract class PhpseclibTestCase extends PHPUnit\Framework\TestCase
     }
 
     // assertNotContains is deprecated for strings in PHPUnit 8
-    public static function assertStringNotContainsString($needle, $haystack, $message = '')
+    public static function assertStringNotContainsString(string $needle, string $haystack, string $message = ''): void
     {
         if (method_exists('\PHPUnit\Framework\TestCase', 'assertStringContainsString')) {
             parent::assertStringNotContainsString($needle, $haystack, $message);