Fix AuthenticationSignonTest failing test with PHP 8.5

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
This commit is contained in:
Maurício Meneghini Fauth 2025-08-17 17:31:44 -03:00
parent e8c216b17e
commit 5933619fee
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
2 changed files with 12 additions and 0 deletions

View File

@ -46420,6 +46420,11 @@ parameters:
count: 6
path: test/classes/Plugins/Auth/AuthenticationHttpTest.php
-
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with array\\{lifetime\\: 0, path\\: '/', domain\\: '', secure\\: false, partitioned\\?\\: false, httponly\\: false, samesite\\?\\: ''\\} and array\\{lifetime\\: int\\<0, max\\>, path\\: non\\-falsy\\-string, domain\\: string, secure\\: bool, httponly\\: bool, samesite\\: string\\} will always evaluate to false\\.$#"
count: 1
path: test/classes/Plugins/Auth/AuthenticationSignonTest.php
-
message: "#^Cannot access offset 'LoginCookieValidity' on mixed\\.$#"
count: 1

View File

@ -17,6 +17,8 @@ use function session_id;
use function session_name;
use function version_compare;
use const PHP_VERSION_ID;
/**
* @covers \PhpMyAdmin\Plugins\Auth\AuthenticationSignon
*/
@ -324,6 +326,7 @@ class AuthenticationSignonTest extends AbstractNetworkTestCase
'path' => '/',
'domain' => '',
'secure' => false,
'partitioned' => false,
'httponly' => false,
'samesite' => '',
];
@ -332,6 +335,10 @@ class AuthenticationSignonTest extends AbstractNetworkTestCase
unset($defaultOptions['samesite']);
}
if (PHP_VERSION_ID < 80500) {
unset($defaultOptions['partitioned']);
}
self::assertSame($defaultOptions, session_get_cookie_params());
}
}