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)
https://bugs.debian.org/1070588
---
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 1099a51..a56a60e 100644
--- a/tests/Unit/Crypt/AES/TestCase.php
+++ b/tests/Unit/Crypt/AES/TestCase.php
@@ -33,7 +33,7 @@ abstract class Unit_Crypt_AES_TestCase extends PhpseclibTestCase
*
* @return array
*/
- public function continuousBufferCombos()
+ public static function continuousBufferCombos()
{
$modes = array(
Base::MODE_CTR,
@@ -132,7 +132,7 @@ abstract class Unit_Crypt_AES_TestCase extends PhpseclibTestCase
*
* @return array
*/
- public function continuousBufferBatteryCombos()
+ public static function continuousBufferBatteryCombos()
{
$modes = array(
Base::MODE_CTR,
diff --git a/tests/Unit/Crypt/BlowfishTest.php b/tests/Unit/Crypt/BlowfishTest.php
index c9bbf6e..73e14cb 100644
--- a/tests/Unit/Crypt/BlowfishTest.php
+++ b/tests/Unit/Crypt/BlowfishTest.php
@@ -11,7 +11,7 @@ use phpseclib\Crypt\Random;
class Unit_Crypt_BlowfishTest extends PhpseclibTestCase
{
- public function engineVectors()
+ public static function engineVectors()
{
$engines = array(
Base::ENGINE_INTERNAL => 'internal',
diff --git a/tests/Unit/Crypt/RC2Test.php b/tests/Unit/Crypt/RC2Test.php
index c24deec..23adb2a 100644
--- a/tests/Unit/Crypt/RC2Test.php
+++ b/tests/Unit/Crypt/RC2Test.php
@@ -16,7 +16,7 @@ class Unit_Crypt_RC2Test extends PhpseclibTestCase
Base::ENGINE_OPENSSL => 'OpenSSL',
);
- public function engineVectors()
+ public static function engineVectors()
{
// tests from https://tools.ietf.org/html/rfc2268#page-8
$tests = array(
@@ -33,7 +33,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 cc0b4d5..b4ad228 100644
--- a/tests/Unit/Crypt/RC4Test.php
+++ b/tests/Unit/Crypt/RC4Test.php
@@ -11,7 +11,7 @@ use phpseclib\Crypt\Random;
class Unit_Crypt_RC4Test extends PhpseclibTestCase
{
- public function engineVectors()
+ public static function engineVectors()
{
$engines = array(
Base::ENGINE_INTERNAL => 'internal',
diff --git a/tests/Unit/Crypt/RandomTest.php b/tests/Unit/Crypt/RandomTest.php
index d531117..8896ec5 100644
--- a/tests/Unit/Crypt/RandomTest.php
+++ b/tests/Unit/Crypt/RandomTest.php
@@ -9,7 +9,7 @@ use phpseclib\Crypt\Random;
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,
@@ -18,7 +18,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 b06ddf3..781191d 100644
--- a/tests/Unit/Crypt/TripleDESTest.php
+++ b/tests/Unit/Crypt/TripleDESTest.php
@@ -16,7 +16,7 @@ class Unit_Crypt_TripleDESTest extends PhpseclibTestCase
Base::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(
@@ -90,7 +90,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]);
}
@@ -116,7 +116,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(
Base::ENGINE_INTERNAL => 'internal',
diff --git a/tests/Unit/Net/SSH1Test.php b/tests/Unit/Net/SSH1Test.php
index 7f7e7d7..662200a 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 7f9357e..7a08612 100644
--- a/tests/Unit/Net/SSH2UnitTest.php
+++ b/tests/Unit/Net/SSH2UnitTest.php
@@ -10,7 +10,7 @@ use phpseclib\Net\SSH2;
class Unit_Net_SSH2UnitTest extends PhpseclibTestCase
{
- public function formatLogDataProvider()
+ public static function formatLogDataProvider()
{
return array(
array(
|