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
|
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Sat, 27 Jul 2024 23:39:41 +0900
Subject: Make provider classes static (PHPUnit 11 fix)
Bug-Debian: https://bugs.debian.org/1070624
---
tests/Unit/Crypt/AES/TestCase.php | 4 ++--
tests/Unit/Crypt/BlowfishTest.php | 2 +-
tests/Unit/Crypt/RC2Test.php | 4 ++--
tests/Unit/Crypt/RC4Test.php | 2 +-
tests/Unit/Crypt/RandomTest.php | 4 ++--
tests/Unit/Crypt/TripleDESTest.php | 6 +++---
tests/Unit/Net/SSH1Test.php | 2 +-
tests/Unit/Net/SSH2UnitTest.php | 2 +-
8 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/tests/Unit/Crypt/AES/TestCase.php b/tests/Unit/Crypt/AES/TestCase.php
index fe18322..c7c47cd 100644
--- a/tests/Unit/Crypt/AES/TestCase.php
+++ b/tests/Unit/Crypt/AES/TestCase.php
@@ -31,7 +31,7 @@ abstract class Unit_Crypt_AES_TestCase extends PhpseclibTestCase
*
* @return array
*/
- public function continuousBufferCombos()
+ public static function continuousBufferCombos()
{
$modes = array(
'CRYPT_MODE_CTR',
@@ -128,7 +128,7 @@ abstract class Unit_Crypt_AES_TestCase extends PhpseclibTestCase
*
* @return array
*/
- public function continuousBufferBatteryCombos()
+ public static function continuousBufferBatteryCombos()
{
$modes = array(
'CRYPT_MODE_CTR',
diff --git a/tests/Unit/Crypt/BlowfishTest.php b/tests/Unit/Crypt/BlowfishTest.php
index 87406c1..5ed327e 100644
--- a/tests/Unit/Crypt/BlowfishTest.php
+++ b/tests/Unit/Crypt/BlowfishTest.php
@@ -10,7 +10,7 @@ require_once 'Crypt/Random.php';
class Unit_Crypt_BlowfishTest extends PhpseclibTestCase
{
- public function engineVectors()
+ public static function engineVectors()
{
$engines = array(
CRYPT_ENGINE_INTERNAL => 'internal',
diff --git a/tests/Unit/Crypt/RC2Test.php b/tests/Unit/Crypt/RC2Test.php
index 0ad664b..fcfcc8b 100644
--- a/tests/Unit/Crypt/RC2Test.php
+++ b/tests/Unit/Crypt/RC2Test.php
@@ -15,7 +15,7 @@ class Unit_Crypt_RC2Test extends PhpseclibTestCase
CRYPT_ENGINE_OPENSSL => 'OpenSSL',
);
- public function engineVectors()
+ public static function engineVectors()
{
// tests from https://tools.ietf.org/html/rfc2268#page-8
$tests = array(
@@ -32,7 +32,7 @@ class Unit_Crypt_RC2Test extends PhpseclibTestCase
$result = array();
- foreach ($this->engines as $engine => $engineName) {
+ foreach ($engines as $engine => $engineName) {
foreach ($tests as $test) {
$result[] = array($engine, $engineName, $test[0], $test[1], $test[2], $test[3]);
}
diff --git a/tests/Unit/Crypt/RC4Test.php b/tests/Unit/Crypt/RC4Test.php
index 4ba34e3..ec893d5 100644
--- a/tests/Unit/Crypt/RC4Test.php
+++ b/tests/Unit/Crypt/RC4Test.php
@@ -9,7 +9,7 @@ require_once 'Crypt/RC4.php';
class Unit_Crypt_RC4Test extends PhpseclibTestCase
{
- public function engineVectors()
+ public static function engineVectors()
{
$engines = array(
CRYPT_ENGINE_INTERNAL => 'internal',
diff --git a/tests/Unit/Crypt/RandomTest.php b/tests/Unit/Crypt/RandomTest.php
index e53efc8..5ba389b 100644
--- a/tests/Unit/Crypt/RandomTest.php
+++ b/tests/Unit/Crypt/RandomTest.php
@@ -7,7 +7,7 @@
class Unit_Crypt_RandomTest extends PhpseclibTestCase
{
- public function stringLengthData()
+ public static function stringLengthData()
{
return array_map(array($this, 'wrap'), array(
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 17, 19, 20, 23, 29, 31, 37,
@@ -16,7 +16,7 @@ class Unit_Crypt_RandomTest extends PhpseclibTestCase
));
}
- /** @dataProvider stringLengthData */
+ /** @group nophpunit11 */
public function testStringLength($length)
{
$this->assertSame(
diff --git a/tests/Unit/Crypt/TripleDESTest.php b/tests/Unit/Crypt/TripleDESTest.php
index c1f09ba..e72836a 100644
--- a/tests/Unit/Crypt/TripleDESTest.php
+++ b/tests/Unit/Crypt/TripleDESTest.php
@@ -15,7 +15,7 @@ class Unit_Crypt_TripleDESTest extends PhpseclibTestCase
CRYPT_ENGINE_OPENSSL => 'OpenSSL',
);
- public function engineVectors()
+ public static function engineVectors()
{
// tests from http://csrc.nist.gov/publications/nistpubs/800-20/800-20.pdf#page=273
$tests = array(
@@ -89,7 +89,7 @@ class Unit_Crypt_TripleDESTest extends PhpseclibTestCase
$result = array();
- foreach ($this->engines as $engine => $engineName) {
+ foreach ($engines as $engine => $engineName) {
foreach ($tests as $test) {
$result[] = array($engine, $engineName, $test[0], $test[1], $test[2]);
}
@@ -115,7 +115,7 @@ class Unit_Crypt_TripleDESTest extends PhpseclibTestCase
$this->assertEquals($result, $expected, "Failed asserting that $plaintext yielded expected output in $engineName engine");
}
- public function engineIVVectors()
+ public static function engineIVVectors()
{
$engines = array(
CRYPT_ENGINE_INTERNAL => 'internal',
diff --git a/tests/Unit/Net/SSH1Test.php b/tests/Unit/Net/SSH1Test.php
index 4429b7b..ac08287 100644
--- a/tests/Unit/Net/SSH1Test.php
+++ b/tests/Unit/Net/SSH1Test.php
@@ -7,7 +7,7 @@
class Unit_Net_SSH1Test extends PhpseclibTestCase
{
- public function formatLogDataProvider()
+ public static function formatLogDataProvider()
{
return array(
array(
diff --git a/tests/Unit/Net/SSH2UnitTest.php b/tests/Unit/Net/SSH2UnitTest.php
index f6756f0..b5b362f 100644
--- a/tests/Unit/Net/SSH2UnitTest.php
+++ b/tests/Unit/Net/SSH2UnitTest.php
@@ -8,7 +8,7 @@
class Unit_Net_SSH2UnitTest extends PhpseclibTestCase
{
- public function formatLogDataProvider()
+ public static function formatLogDataProvider()
{
return array(
array(
|