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
|
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Sun, 19 May 2024 20:03:17 +0200
Subject: Make provider functions static (PHPUnit 11 Fix)
Bug-Debian: https://bugs.debian.org/1070603
---
tests/AuthorizationTest.php | 4 ++--
tests/Jwt/LcobucciFactoryTest.php | 2 +-
tests/UpdateTest.php | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/AuthorizationTest.php b/tests/AuthorizationTest.php
index 9b1b1d5..3a181a6 100644
--- a/tests/AuthorizationTest.php
+++ b/tests/AuthorizationTest.php
@@ -123,7 +123,7 @@ class AuthorizationTest extends TestCase
$this->assertSame($expected, $cookie->getDomain());
}
- public function provideApplicableCookieDomains(): iterable
+ public static function provideApplicableCookieDomains(): iterable
{
yield ['.example.com', 'https://foo.bar.baz.example.com', 'https://foo.bar.baz.qux.example.com'];
yield ['.foo.bar.baz.example.com', 'https://mercure.foo.bar.baz.example.com', 'https://app.foo.bar.baz.example.com'];
@@ -157,7 +157,7 @@ class AuthorizationTest extends TestCase
$authorization->createCookie(Request::create($requestUrl));
}
- public function provideNonApplicableCookieDomains(): iterable
+ public static function provideNonApplicableCookieDomains(): iterable
{
yield ['https://demo.mercure.com', 'https://example.com'];
yield ['https://mercure.internal.com', 'https://external.com'];
diff --git a/tests/Jwt/LcobucciFactoryTest.php b/tests/Jwt/LcobucciFactoryTest.php
index 0998902..69b3de0 100644
--- a/tests/Jwt/LcobucciFactoryTest.php
+++ b/tests/Jwt/LcobucciFactoryTest.php
@@ -103,7 +103,7 @@ TZCHmg89ySLBfCAspVeo63o/R7bs9a7BP9x2h5uwCBogSvkEwhhPKnboVN45bp9c
new LcobucciFactory('!ChangeMe!', 'md5');
}
- public function provideCreateCases(): iterable
+ public static function provideCreateCases(): iterable
{
yield [
'secret' => 'looooooooooooongenoughtestsecret',
diff --git a/tests/UpdateTest.php b/tests/UpdateTest.php
index 00d9485..1a3cc01 100644
--- a/tests/UpdateTest.php
+++ b/tests/UpdateTest.php
@@ -35,7 +35,7 @@ class UpdateTest extends TestCase
$this->assertSame($retry, $update->getRetry());
}
- public function updateProvider(): array
+ public static function updateProvider(): array
{
return [
['http://example.com/foo', 'payload', true, 'id', 'type', 1936],
|