Backport some fixes for PHPUnit 10 compatibility
- Fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1070623 Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
This commit is contained in:
parent
85a1421c51
commit
46f2c8871c
@ -106,7 +106,7 @@
|
||||
"phpstan/phpstan": "^1.4.8",
|
||||
"phpstan/phpstan-phpunit": "^1.0",
|
||||
"phpstan/phpstan-webmozart-assert": "^1.0",
|
||||
"phpunit/phpunit": "^8.5.16 || ^9.5",
|
||||
"phpunit/phpunit": "^8.5.16 || ^9.6",
|
||||
"pragmarx/google2fa-qrcode": "^2.1",
|
||||
"psalm/plugin-phpunit": "^0.16.1",
|
||||
"roave/security-advisories": "dev-latest",
|
||||
|
||||
@ -1940,11 +1940,6 @@ parameters:
|
||||
count: 1
|
||||
path: libraries/classes/Database/CentralColumns.php
|
||||
|
||||
-
|
||||
message: "#^Right side of \\|\\| is always false\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Database/CentralColumns.php
|
||||
|
||||
-
|
||||
message: "#^Method PhpMyAdmin\\\\Database\\\\Designer\\:\\:getDatabaseTables\\(\\) has parameter \\$tab_column with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@ -2930,11 +2925,21 @@ parameters:
|
||||
count: 1
|
||||
path: libraries/classes/Dbal/DbiMysqli.php
|
||||
|
||||
-
|
||||
message: "#^Method PhpMyAdmin\\\\Dbal\\\\MysqliResult\\:\\:fetchAllAssoc\\(\\) should return array\\<int, array\\<string, string\\|null\\>\\> but returns array\\<int\\<0, max\\>, array\\<string, float\\|int\\|string\\|null\\>\\>\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Dbal/MysqliResult.php
|
||||
|
||||
-
|
||||
message: "#^Method PhpMyAdmin\\\\Dbal\\\\MysqliResult\\:\\:fetchAllKeyPair\\(\\) should return array\\<string, string\\|null\\> but returns array\\<int\\|string, mixed\\>\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Dbal/MysqliResult.php
|
||||
|
||||
-
|
||||
message: "#^Method PhpMyAdmin\\\\Dbal\\\\MysqliResult\\:\\:fetchAssoc\\(\\) should return array\\<string, string\\|null\\> but returns array\\<string, float\\|int\\|string\\|null\\>\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Dbal/MysqliResult.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset int\\<0, max\\> on mixed\\.$#"
|
||||
count: 2
|
||||
@ -5365,11 +5370,6 @@ parameters:
|
||||
count: 1
|
||||
path: libraries/classes/Navigation/NavigationTree.php
|
||||
|
||||
-
|
||||
message: "#^Right side of \\|\\| is always false\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Navigation/NavigationTree.php
|
||||
|
||||
-
|
||||
message: "#^Method PhpMyAdmin\\\\Navigation\\\\NodeFactory\\:\\:getInstance\\(\\) has parameter \\$name with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@ -5730,11 +5730,6 @@ parameters:
|
||||
count: 1
|
||||
path: libraries/classes/Pdf.php
|
||||
|
||||
-
|
||||
message: "#^Left side of \\|\\| is always false\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Plugins.php
|
||||
|
||||
-
|
||||
message: "#^Method PhpMyAdmin\\\\Plugins\\:\\:getExport\\(\\) should return array\\<PhpMyAdmin\\\\Plugins\\\\ExportPlugin\\> but returns array\\<PhpMyAdmin\\\\Plugins\\\\Plugin\\>\\.$#"
|
||||
count: 1
|
||||
@ -5755,11 +5750,6 @@ parameters:
|
||||
count: 1
|
||||
path: libraries/classes/Plugins.php
|
||||
|
||||
-
|
||||
message: "#^Right side of \\|\\| is always false\\.$#"
|
||||
count: 3
|
||||
path: libraries/classes/Plugins.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$remoteIp of method ReCaptcha\\\\ReCaptcha\\:\\:verify\\(\\) expects string\\|null, bool\\|string given\\.$#"
|
||||
count: 1
|
||||
|
||||
@ -131,8 +131,11 @@ abstract class AbstractTestCase extends TestCase
|
||||
/**
|
||||
* PHPUnit 8 compatibility
|
||||
*/
|
||||
public static function assertMatchesRegularExpression(string $pattern, string $string, string $message = ''): void
|
||||
{
|
||||
public static function assertMatchesRegularExpressionCompat(
|
||||
string $pattern,
|
||||
string $string,
|
||||
string $message = ''
|
||||
): void {
|
||||
if (method_exists(TestCase::class, 'assertMatchesRegularExpression')) {
|
||||
/** @phpstan-ignore-next-line */
|
||||
parent::assertMatchesRegularExpression($pattern, $string, $message);
|
||||
@ -142,20 +145,6 @@ abstract class AbstractTestCase extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* PHPUnit 8 compatibility
|
||||
*/
|
||||
public static function assertFileDoesNotExist(string $filename, string $message = ''): void
|
||||
{
|
||||
if (method_exists(TestCase::class, 'assertFileDoesNotExist')) {
|
||||
/** @phpstan-ignore-next-line */
|
||||
parent::assertFileDoesNotExist($filename, $message);
|
||||
} else {
|
||||
/** @psalm-suppress DeprecatedMethod */
|
||||
parent::assertFileNotExists($filename, $message);
|
||||
}
|
||||
}
|
||||
|
||||
protected function loadContainerBuilder(): void
|
||||
{
|
||||
global $containerBuilder;
|
||||
|
||||
@ -33,7 +33,7 @@ class AdvisorTest extends AbstractTestCase
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
public function advisorTimes(): array
|
||||
public static function advisorTimes(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -90,7 +90,7 @@ class AdvisorTest extends AbstractTestCase
|
||||
$this->assertEquals([$expected], $runResult['fired']);
|
||||
}
|
||||
|
||||
public function rulesProvider(): array
|
||||
public static function rulesProvider(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -20,7 +20,7 @@ class CacheTest extends AbstractTestCase
|
||||
/**
|
||||
* @return array[]
|
||||
*/
|
||||
public function dataProviderCacheKeyValues(): array
|
||||
public static function dataProviderCacheKeyValues(): array
|
||||
{
|
||||
return [
|
||||
'normal key and false value' => [
|
||||
|
||||
@ -54,7 +54,7 @@ class CollationTest extends AbstractTestCase
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function providerTestBuildDescription(): array
|
||||
public static function providerTestBuildDescription(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -32,7 +32,7 @@ class SetVersionCommandTest extends AbstractTestCase
|
||||
/**
|
||||
* @return array[]
|
||||
*/
|
||||
public function dataProviderBadVersions(): array
|
||||
public static function dataProviderBadVersions(): array
|
||||
{
|
||||
return [
|
||||
[''],
|
||||
@ -76,7 +76,7 @@ class SetVersionCommandTest extends AbstractTestCase
|
||||
/**
|
||||
* @return array[]
|
||||
*/
|
||||
public function dataProviderGoodVersions(): array
|
||||
public static function dataProviderGoodVersions(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -98,6 +98,9 @@ class TwigLintCommandTest extends AbstractTestCase
|
||||
], $filesInfos);
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testGetFilesInfoInvalidFile(): void
|
||||
{
|
||||
$command = $this->getMockBuilder(TwigLintCommand::class)
|
||||
|
||||
@ -19,6 +19,9 @@ class WriteGitRevisionCommandTest extends AbstractTestCase
|
||||
/** @var WriteGitRevisionCommand */
|
||||
private $command;
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testGetGeneratedClassValidVersion(): void
|
||||
{
|
||||
if (! class_exists(Command::class)) {
|
||||
|
||||
@ -28,7 +28,7 @@ class CommonTest extends AbstractTestCase
|
||||
$this->assertEquals($expected, $GLOBALS['PMA_PHP_SELF']);
|
||||
}
|
||||
|
||||
public function providerForTestCleanupPathInfo(): array
|
||||
public static function providerForTestCleanupPathInfo(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -40,7 +40,7 @@ class DescriptionTest extends AbstractTestCase
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getValues(): array
|
||||
public static function getValues(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -150,7 +150,7 @@ class FormTest extends AbstractTestCase
|
||||
$this->assertIsString($result[1]);
|
||||
|
||||
// needs regexp because the counter is static
|
||||
$this->assertMatchesRegularExpression('/^preffoo\/foo\/bar\/\:group\:end\:\d+$/', $result[1]);
|
||||
$this->assertMatchesRegularExpressionCompat('/^preffoo\/foo\/bar\/\:group\:end\:\d+$/', $result[1]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -186,7 +186,7 @@ class FormTest extends AbstractTestCase
|
||||
$keys = array_keys($result);
|
||||
$key = $keys[0];
|
||||
$this->assertIsString($key);
|
||||
$this->assertMatchesRegularExpression('/^\:group\:end\:(\d+)$/', $key);
|
||||
$this->assertMatchesRegularExpressionCompat('/^\:group\:end\:(\d+)$/', $key);
|
||||
|
||||
preg_match('/^\:group\:end\:(\d+)$/', $key, $matches);
|
||||
$digit = $matches[1];
|
||||
|
||||
@ -65,7 +65,7 @@ class FormListTest extends AbstractTestCase
|
||||
* @return string[][]
|
||||
* @psalm-return array{array{class-string<BaseFormList>, class-string<BaseForm>}}
|
||||
*/
|
||||
public function formObjects(): array
|
||||
public static function formObjects(): array
|
||||
{
|
||||
return [
|
||||
[User\UserFormList::class, User\ExportForm::class],
|
||||
|
||||
@ -59,7 +59,7 @@ class ConsoleTest extends TestCase
|
||||
* @return mixed[][][][]
|
||||
* @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][]
|
||||
*/
|
||||
public function providerForTestConstructor(): array
|
||||
public static function providerForTestConstructor(): array
|
||||
{
|
||||
return [
|
||||
'null values' => [
|
||||
|
||||
@ -48,7 +48,7 @@ class DebugTest extends TestCase
|
||||
* @return mixed[][][][]
|
||||
* @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][]
|
||||
*/
|
||||
public function providerForTestConstructor(): array
|
||||
public static function providerForTestConstructor(): array
|
||||
{
|
||||
return [
|
||||
'null values' => [
|
||||
|
||||
@ -157,7 +157,7 @@ class ExportTest extends TestCase
|
||||
* @return mixed[][][][]
|
||||
* @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][]
|
||||
*/
|
||||
public function providerForTestConstructor(): array
|
||||
public static function providerForTestConstructor(): array
|
||||
{
|
||||
return [
|
||||
'null values' => [
|
||||
|
||||
@ -76,7 +76,7 @@ class ImportTest extends TestCase
|
||||
* @return mixed[][][][]
|
||||
* @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][]
|
||||
*/
|
||||
public function providerForTestConstructor(): array
|
||||
public static function providerForTestConstructor(): array
|
||||
{
|
||||
return [
|
||||
'null values' => [
|
||||
|
||||
@ -69,7 +69,7 @@ class SchemaTest extends TestCase
|
||||
* @return mixed[][][][]
|
||||
* @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][]
|
||||
*/
|
||||
public function providerForTestConstructor(): array
|
||||
public static function providerForTestConstructor(): array
|
||||
{
|
||||
return [
|
||||
'null values' => [
|
||||
|
||||
@ -110,7 +110,7 @@ class ServerTest extends TestCase
|
||||
* @return mixed[][][][]
|
||||
* @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][]
|
||||
*/
|
||||
public function providerForTestConstructor(): array
|
||||
public static function providerForTestConstructor(): array
|
||||
{
|
||||
return [
|
||||
'null values' => [
|
||||
|
||||
@ -48,7 +48,7 @@ class SqlQueryBoxTest extends TestCase
|
||||
* @return mixed[][][][]
|
||||
* @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][]
|
||||
*/
|
||||
public function providerForTestConstructor(): array
|
||||
public static function providerForTestConstructor(): array
|
||||
{
|
||||
return [
|
||||
'null values' => [
|
||||
|
||||
@ -60,7 +60,7 @@ class TransformationsTest extends TestCase
|
||||
* @return mixed[][][][]
|
||||
* @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][]
|
||||
*/
|
||||
public function providerForTestConstructor(): array
|
||||
public static function providerForTestConstructor(): array
|
||||
{
|
||||
return [
|
||||
'null values' => [
|
||||
|
||||
@ -372,7 +372,7 @@ class SettingsTest extends TestCase
|
||||
* @return mixed[][][][]
|
||||
* @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][]
|
||||
*/
|
||||
public function providerForTestConstructor(): array
|
||||
public static function providerForTestConstructor(): array
|
||||
{
|
||||
return [
|
||||
'null values' => [
|
||||
|
||||
@ -57,6 +57,8 @@ class RelationCleanupTest extends AbstractTestCase
|
||||
|
||||
/**
|
||||
* Test for column method
|
||||
*
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testColumnWithRelations(): void
|
||||
{
|
||||
@ -117,6 +119,8 @@ class RelationCleanupTest extends AbstractTestCase
|
||||
|
||||
/**
|
||||
* Test for table method
|
||||
*
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testTableWithRelations(): void
|
||||
{
|
||||
@ -196,6 +200,8 @@ class RelationCleanupTest extends AbstractTestCase
|
||||
|
||||
/**
|
||||
* Test for database method
|
||||
*
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testDatabaseWithRelations(): void
|
||||
{
|
||||
@ -256,6 +262,8 @@ class RelationCleanupTest extends AbstractTestCase
|
||||
|
||||
/**
|
||||
* Test for user method
|
||||
*
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testUserWithRelations(): void
|
||||
{
|
||||
|
||||
@ -257,7 +257,7 @@ class RelationParametersTest extends TestCase
|
||||
/**
|
||||
* @return array<string, array<int, array<string, mixed>>>
|
||||
*/
|
||||
public function providerForTestToArray(): array
|
||||
public static function providerForTestToArray(): array
|
||||
{
|
||||
return [
|
||||
'default values' => [
|
||||
|
||||
@ -2217,7 +2217,7 @@ class RelationTest extends AbstractTestCase
|
||||
* @return array<int, array<int, array<int|string, bool|string>>>
|
||||
* @psalm-return list<array{array<string, bool|string>, string[]}>
|
||||
*/
|
||||
public function providerForTestRenameTable(): array
|
||||
public static function providerForTestRenameTable(): array
|
||||
{
|
||||
// phpcs:disable Generic.Files.LineLength.TooLong
|
||||
return [
|
||||
|
||||
@ -90,6 +90,8 @@ class UserGroupsTest extends AbstractTestCase
|
||||
|
||||
/**
|
||||
* Tests UserGroups::delete() function
|
||||
*
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testDeleteUserGroup(): void
|
||||
{
|
||||
|
||||
@ -230,7 +230,7 @@ class ConfigTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function userAgentProvider(): array
|
||||
public static function userAgentProvider(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -415,7 +415,7 @@ class ConfigTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function serverNames(): array
|
||||
public static function serverNames(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -577,7 +577,7 @@ class ConfigTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function httpsParams(): array
|
||||
public static function httpsParams(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -812,7 +812,7 @@ class ConfigTest extends AbstractTestCase
|
||||
*
|
||||
* @return array data for testGetRootPath
|
||||
*/
|
||||
public function rootUris(): array
|
||||
public static function rootUris(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -920,7 +920,7 @@ class ConfigTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function configPaths(): array
|
||||
public static function configPaths(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -1090,7 +1090,7 @@ class ConfigTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function serverSettingsProvider(): array
|
||||
public static function serverSettingsProvider(): array
|
||||
{
|
||||
return [
|
||||
'empty' => [
|
||||
@ -1113,6 +1113,7 @@ class ConfigTest extends AbstractTestCase
|
||||
|
||||
/**
|
||||
* @group with-trigger-error
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testCheckServersWithInvalidServer(): void
|
||||
{
|
||||
@ -1149,7 +1150,7 @@ class ConfigTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function selectServerProvider(): array
|
||||
public static function selectServerProvider(): array
|
||||
{
|
||||
return [
|
||||
'zero' => [
|
||||
@ -1222,7 +1223,7 @@ class ConfigTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function connectionParams(): array
|
||||
public static function connectionParams(): array
|
||||
{
|
||||
$cfg_basic = [
|
||||
'user' => 'u',
|
||||
|
||||
@ -95,7 +95,7 @@ class SimulateDmlControllerTest extends AbstractTestCase
|
||||
* }
|
||||
* >
|
||||
*/
|
||||
public function providerForTestGetMatchedRows(): array
|
||||
public static function providerForTestGetMatchedRows(): array
|
||||
{
|
||||
// Data from table:
|
||||
// CREATE TABLE `t` AS
|
||||
|
||||
@ -311,7 +311,7 @@ class CoreTest extends AbstractNetworkTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerTestGotoNowhere(): array
|
||||
public static function providerTestGotoNowhere(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -421,7 +421,7 @@ class CoreTest extends AbstractNetworkTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerTestGetRealSize(): array
|
||||
public static function providerTestGetRealSize(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -506,7 +506,7 @@ class CoreTest extends AbstractNetworkTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerTestLinkURL(): array
|
||||
public static function providerTestLinkURL(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -625,7 +625,7 @@ class CoreTest extends AbstractNetworkTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provideTestIsAllowedDomain(): array
|
||||
public static function provideTestIsAllowedDomain(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -684,7 +684,7 @@ class CoreTest extends AbstractNetworkTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provideTestSafeUnserialize(): array
|
||||
public static function provideTestSafeUnserialize(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -756,7 +756,7 @@ class CoreTest extends AbstractNetworkTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provideTestSanitizeMySQLHost(): array
|
||||
public static function provideTestSanitizeMySQLHost(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -989,7 +989,7 @@ class CoreTest extends AbstractNetworkTestCase
|
||||
/**
|
||||
* @return array<int, array<int, array<string, string|mixed[]>>>
|
||||
*/
|
||||
public function providerForTestPopulateRequestWithEncryptedQueryParamsWithInvalidParam(): array
|
||||
public static function providerForTestPopulateRequestWithEncryptedQueryParamsWithInvalidParam(): array
|
||||
{
|
||||
return [
|
||||
[[], []],
|
||||
|
||||
@ -45,7 +45,7 @@ class CreateAddFieldTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetPartitionsDefinition(): array
|
||||
public static function providerGetPartitionsDefinition(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -246,7 +246,7 @@ class CreateAddFieldTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetTableCreationQuery(): array
|
||||
public static function providerGetTableCreationQuery(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -319,7 +319,7 @@ class CreateAddFieldTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetNumberOfFieldsFromRequest(): array
|
||||
public static function providerGetNumberOfFieldsFromRequest(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -334,7 +334,7 @@ class CreateAddFieldTest extends AbstractTestCase
|
||||
*
|
||||
* @return array[]
|
||||
*/
|
||||
public function providerGetColumnCreationQueryRequest(): array
|
||||
public static function providerGetColumnCreationQueryRequest(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -68,7 +68,7 @@ class EventsTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetDataFromRequest(): array
|
||||
public static function providerGetDataFromRequest(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -162,7 +162,7 @@ class EventsTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetEditorFormAdd(): array
|
||||
public static function providerGetEditorFormAdd(): array
|
||||
{
|
||||
$data = [
|
||||
'item_name' => '',
|
||||
@ -217,7 +217,7 @@ class EventsTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetEditorFormEdit(): array
|
||||
public static function providerGetEditorFormEdit(): array
|
||||
{
|
||||
$data = [
|
||||
'item_name' => 'foo',
|
||||
@ -273,7 +273,7 @@ class EventsTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetEditorFormAjax(): array
|
||||
public static function providerGetEditorFormAjax(): array
|
||||
{
|
||||
$data = [
|
||||
'item_name' => '',
|
||||
@ -334,7 +334,7 @@ class EventsTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetQueryFromRequest(): array
|
||||
public static function providerGetQueryFromRequest(): array
|
||||
{
|
||||
return [
|
||||
// Testing success
|
||||
|
||||
@ -74,7 +74,7 @@ class RoutinesTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetDataFromRequest(): array
|
||||
public static function providerGetDataFromRequest(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -328,7 +328,7 @@ class RoutinesTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetParameterRow(): array
|
||||
public static function providerGetParameterRow(): array
|
||||
{
|
||||
$data = [
|
||||
'item_name' => '',
|
||||
@ -408,7 +408,7 @@ class RoutinesTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetParameterRowAjax(): array
|
||||
public static function providerGetParameterRowAjax(): array
|
||||
{
|
||||
$data = [
|
||||
'item_name' => '',
|
||||
@ -481,7 +481,7 @@ class RoutinesTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetEditorForm1(): array
|
||||
public static function providerGetEditorForm1(): array
|
||||
{
|
||||
$data = [
|
||||
'item_name' => '',
|
||||
@ -598,7 +598,7 @@ class RoutinesTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetEditorForm2(): array
|
||||
public static function providerGetEditorForm2(): array
|
||||
{
|
||||
$data = [
|
||||
'item_name' => 'foo',
|
||||
@ -717,7 +717,7 @@ class RoutinesTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetEditorForm3(): array
|
||||
public static function providerGetEditorForm3(): array
|
||||
{
|
||||
$data = [
|
||||
'item_name' => 'foo',
|
||||
@ -830,7 +830,7 @@ class RoutinesTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetEditorForm4(): array
|
||||
public static function providerGetEditorForm4(): array
|
||||
{
|
||||
$data = [
|
||||
'item_name' => 'foo',
|
||||
@ -888,7 +888,7 @@ class RoutinesTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetExecuteForm1(): array
|
||||
public static function providerGetExecuteForm1(): array
|
||||
{
|
||||
$data = [
|
||||
'item_name' => 'foo',
|
||||
@ -1031,7 +1031,7 @@ class RoutinesTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetExecuteForm2(): array
|
||||
public static function providerGetExecuteForm2(): array
|
||||
{
|
||||
$data = [
|
||||
'item_name' => 'foo',
|
||||
@ -1195,7 +1195,7 @@ class RoutinesTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetQueryFromRequest(): array
|
||||
public static function providerGetQueryFromRequest(): array
|
||||
{
|
||||
return [
|
||||
// Testing success
|
||||
|
||||
@ -90,7 +90,7 @@ class SearchTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function searchTypes(): array
|
||||
public static function searchTypes(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -66,7 +66,7 @@ class TriggersTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetDataFromRequestEmpty(): array
|
||||
public static function providerGetDataFromRequestEmpty(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -134,7 +134,7 @@ class TriggersTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetEditorFormAdd(): array
|
||||
public static function providerGetEditorFormAdd(): array
|
||||
{
|
||||
$data = [
|
||||
'item_name' => '',
|
||||
@ -180,7 +180,7 @@ class TriggersTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetEditorFormEdit(): array
|
||||
public static function providerGetEditorFormEdit(): array
|
||||
{
|
||||
$data = [
|
||||
'item_name' => 'foo',
|
||||
@ -227,7 +227,7 @@ class TriggersTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetEditorFormAjax(): array
|
||||
public static function providerGetEditorFormAjax(): array
|
||||
{
|
||||
$data = [
|
||||
'item_name' => 'foo',
|
||||
@ -290,7 +290,7 @@ class TriggersTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetQueryFromRequest(): array
|
||||
public static function providerGetQueryFromRequest(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -80,7 +80,7 @@ class DatabaseInterfaceTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function currentUserData(): array
|
||||
public static function currentUserData(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -394,7 +394,7 @@ class DatabaseInterfaceTest extends AbstractTestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function errorData(): array
|
||||
public static function errorData(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -457,7 +457,7 @@ class DatabaseInterfaceTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function isAmazonRdsData(): array
|
||||
public static function isAmazonRdsData(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -497,7 +497,7 @@ class DatabaseInterfaceTest extends AbstractTestCase
|
||||
$this->assertEquals($upgrade, $ver_int < $GLOBALS['cfg']['MysqlMinVersion']['internal']);
|
||||
}
|
||||
|
||||
public function versionData(): array
|
||||
public static function versionData(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -925,7 +925,7 @@ class DatabaseInterfaceTest extends AbstractTestCase
|
||||
* @return array
|
||||
* @psalm-return array<int, array{array<array-key, mixed>, int, bool, bool}>
|
||||
*/
|
||||
public function provideDatabaseVersionData(): array
|
||||
public static function provideDatabaseVersionData(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -62,7 +62,7 @@ class DatabaseNameTest extends TestCase
|
||||
* @return mixed[][]
|
||||
* @psalm-return non-empty-list<array{mixed, string}>
|
||||
*/
|
||||
public function providerForTestInvalidMixedNames(): array
|
||||
public static function providerForTestInvalidMixedNames(): array
|
||||
{
|
||||
return [
|
||||
[null, 'Expected a string. Got: NULL'],
|
||||
|
||||
@ -69,7 +69,7 @@ class DbiDummyTest extends AbstractTestCase
|
||||
/**
|
||||
* Data provider for schema test
|
||||
*/
|
||||
public function schemaData(): array
|
||||
public static function schemaData(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -104,7 +104,7 @@ class DbiDummyTest extends AbstractTestCase
|
||||
/**
|
||||
* Data provider for error formatting test
|
||||
*/
|
||||
public function errorData(): array
|
||||
public static function errorData(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -62,7 +62,7 @@ class TableNameTest extends TestCase
|
||||
* @return mixed[][]
|
||||
* @psalm-return non-empty-list<array{mixed, string}>
|
||||
*/
|
||||
public function providerForTestInvalidMixedNames(): array
|
||||
public static function providerForTestInvalidMixedNames(): array
|
||||
{
|
||||
return [
|
||||
[null, 'Expected a string. Got: NULL'],
|
||||
|
||||
@ -30,7 +30,7 @@ class WarningTest extends TestCase
|
||||
* @return int[][]|string[][]|string[][][]
|
||||
* @psalm-return array{string[], string, int, string, string}[]
|
||||
*/
|
||||
public function providerForTestWarning(): array
|
||||
public static function providerForTestWarning(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -141,7 +141,7 @@ class ResultsTest extends AbstractTestCase
|
||||
*
|
||||
* @return array array data for testGetTableNavigationButton
|
||||
*/
|
||||
public function providerForTestGetTableNavigationButton(): array
|
||||
public static function providerForTestGetTableNavigationButton(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -238,7 +238,7 @@ class ResultsTest extends AbstractTestCase
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForTestGetSpecialLinkUrl(): array
|
||||
public static function dataProviderForTestGetSpecialLinkUrl(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -346,7 +346,7 @@ class ResultsTest extends AbstractTestCase
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForTestGetRowInfoForSpecialLinks(): array
|
||||
public static function dataProviderForTestGetRowInfoForSpecialLinks(): array
|
||||
{
|
||||
$column_names = [
|
||||
'host',
|
||||
@ -428,7 +428,7 @@ class ResultsTest extends AbstractTestCase
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForTestSetHighlightedColumnGlobalField(): array
|
||||
public static function dataProviderForTestSetHighlightedColumnGlobalField(): array
|
||||
{
|
||||
$parser = new Parser('SELECT * FROM db_name WHERE `db_name`.`tbl`.id > 0 AND `id` < 10');
|
||||
|
||||
@ -469,7 +469,7 @@ class ResultsTest extends AbstractTestCase
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForTestGetPartialText(): array
|
||||
public static function dataProviderForTestGetPartialText(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -555,7 +555,7 @@ class ResultsTest extends AbstractTestCase
|
||||
* string
|
||||
* }}
|
||||
*/
|
||||
public function dataProviderForTestHandleNonPrintableContents(): array
|
||||
public static function dataProviderForTestHandleNonPrintableContents(): array
|
||||
{
|
||||
$transformation_plugin = new Text_Plain_Link();
|
||||
$meta = new FieldMetadata(MYSQLI_TYPE_BLOB, 0, (object) ['orgtable' => 'bar']);
|
||||
@ -692,7 +692,7 @@ class ResultsTest extends AbstractTestCase
|
||||
* string
|
||||
* }}
|
||||
*/
|
||||
public function dataProviderForTestGetDataCellForNonNumericColumns(): array
|
||||
public static function dataProviderForTestGetDataCellForNonNumericColumns(): array
|
||||
{
|
||||
$transformation_plugin = new Text_Plain_Link();
|
||||
$transformation_plugin_external = new Text_Plain_External();
|
||||
@ -971,7 +971,7 @@ class ResultsTest extends AbstractTestCase
|
||||
$this->assertStringContainsString('>T<', $output);
|
||||
}
|
||||
|
||||
public function dataProviderGetSortOrderHiddenInputs(): array
|
||||
public static function dataProviderGetSortOrderHiddenInputs(): array
|
||||
{
|
||||
// SQL to add the column
|
||||
// SQL to remove the column
|
||||
@ -1180,7 +1180,7 @@ class ResultsTest extends AbstractTestCase
|
||||
$this->assertSame($expected, $_SESSION['tmpval']);
|
||||
}
|
||||
|
||||
public function providerSetConfigParamsForDisplayTable(): array
|
||||
public static function providerSetConfigParamsForDisplayTable(): array
|
||||
{
|
||||
$cfg = ['RelationalDisplay' => DisplayResults::RELATIONAL_KEY, 'MaxRows' => 25, 'RepeatCells' => 100];
|
||||
|
||||
@ -1671,7 +1671,7 @@ class ResultsTest extends AbstractTestCase
|
||||
/**
|
||||
* @return array[]
|
||||
*/
|
||||
public function dataProviderSortOrder(): array
|
||||
public static function dataProviderSortOrder(): array
|
||||
{
|
||||
return [
|
||||
'Default date' => [
|
||||
|
||||
@ -179,7 +179,7 @@ class PbxtTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerFortTestResolveTypeSize(): array
|
||||
public static function providerFortTestResolveTypeSize(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -58,7 +58,7 @@ class ErrorHandlerTest extends AbstractTestCase
|
||||
*
|
||||
* @return array data for testHandleError
|
||||
*/
|
||||
public function providerForTestHandleError(): array
|
||||
public static function providerForTestHandleError(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -130,6 +130,7 @@ class ErrorHandlerTest extends AbstractTestCase
|
||||
* disabled
|
||||
*
|
||||
* @dataProvider providerForTestHandleError
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testGetDispErrorsForDisplayTrue(
|
||||
int $errno,
|
||||
|
||||
@ -276,7 +276,7 @@ class ErrorReportTest extends AbstractTestCase
|
||||
*
|
||||
* @return array[]
|
||||
*/
|
||||
public function urlsToSanitize(): array
|
||||
public static function urlsToSanitize(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -84,7 +84,7 @@ class ErrorTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function filePathProvider(): array
|
||||
public static function filePathProvider(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -116,6 +116,8 @@ class ErrorTest extends AbstractTestCase
|
||||
|
||||
/**
|
||||
* Test for getBacktraceDisplay
|
||||
*
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testGetBacktraceDisplay(): void
|
||||
{
|
||||
|
||||
@ -69,7 +69,7 @@ class FileTest extends AbstractTestCase
|
||||
$file->close();
|
||||
}
|
||||
|
||||
public function compressedFiles(): array
|
||||
public static function compressedFiles(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -38,7 +38,7 @@ class GisFactoryTest extends AbstractTestCase
|
||||
*
|
||||
* @return array[] data for testFactory
|
||||
*/
|
||||
public function providerForTestFactory(): array
|
||||
public static function providerForTestFactory(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -57,7 +57,7 @@ class GisGeometryCollectionTest extends AbstractTestCase
|
||||
*
|
||||
* @return array test data for testScaleRow() test case
|
||||
*/
|
||||
public function providerForScaleRow(): array
|
||||
public static function providerForScaleRow(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -95,7 +95,7 @@ class GisGeometryCollectionTest extends AbstractTestCase
|
||||
*
|
||||
* @return array test data for testGenerateWkt() test case
|
||||
*/
|
||||
public function providerForGenerateWkt(): array
|
||||
public static function providerForGenerateWkt(): array
|
||||
{
|
||||
$temp1 = [
|
||||
0 => [
|
||||
@ -208,7 +208,7 @@ class GisGeometryCollectionTest extends AbstractTestCase
|
||||
*
|
||||
* @return array test data for testGenerateParams() test case
|
||||
*/
|
||||
public function providerForGenerateParams(): array
|
||||
public static function providerForGenerateParams(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -280,7 +280,7 @@ class GisGeometryCollectionTest extends AbstractTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsPdf() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsPdf(): array
|
||||
public static function providerForPrepareRowAsPdf(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -319,7 +319,7 @@ class GisGeometryCollectionTest extends AbstractTestCase
|
||||
$string = $this->object->prepareRowAsSvg($spatial, $label, $lineColor, $scaleData);
|
||||
$this->assertEquals(1, preg_match($output, $string));
|
||||
|
||||
$this->assertMatchesRegularExpression(
|
||||
$this->assertMatchesRegularExpressionCompat(
|
||||
$output,
|
||||
$this->object->prepareRowAsSvg($spatial, $label, $lineColor, $scaleData)
|
||||
);
|
||||
@ -330,7 +330,7 @@ class GisGeometryCollectionTest extends AbstractTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsSvg() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsSvg(): array
|
||||
public static function providerForPrepareRowAsSvg(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -388,7 +388,7 @@ class GisGeometryCollectionTest extends AbstractTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsOl() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsOl(): array
|
||||
public static function providerForPrepareRowAsOl(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -66,7 +66,7 @@ class GisGeometryTest extends AbstractTestCase
|
||||
*
|
||||
* @return array data for testSetMinMax
|
||||
*/
|
||||
public function providerForTestSetMinMax(): array
|
||||
public static function providerForTestSetMinMax(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -123,7 +123,7 @@ class GisGeometryTest extends AbstractTestCase
|
||||
*
|
||||
* @return array data for testGenerateParams
|
||||
*/
|
||||
public function providerForTestGenerateParams(): array
|
||||
public static function providerForTestGenerateParams(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -182,7 +182,7 @@ class GisGeometryTest extends AbstractTestCase
|
||||
*
|
||||
* @return array data for testExtractPoints
|
||||
*/
|
||||
public function providerForTestExtractPoints(): array
|
||||
public static function providerForTestExtractPoints(): array
|
||||
{
|
||||
return [
|
||||
// with no scale data
|
||||
@ -297,7 +297,7 @@ class GisGeometryTest extends AbstractTestCase
|
||||
*
|
||||
* @return array test data for the testGetBoundsForOl() test case
|
||||
*/
|
||||
public function providerForTestGetBoundsForOl(): array
|
||||
public static function providerForTestGetBoundsForOl(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -349,7 +349,7 @@ class GisGeometryTest extends AbstractTestCase
|
||||
*
|
||||
* @return array test data for testGetPolygonArrayForOpenLayers() test case
|
||||
*/
|
||||
public function providerForTestGetPolygonArrayForOpenLayers(): array
|
||||
public static function providerForTestGetPolygonArrayForOpenLayers(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -43,7 +43,7 @@ class GisLineStringTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testGenerateWkt
|
||||
*/
|
||||
public function providerForTestGenerateWkt(): array
|
||||
public static function providerForTestGenerateWkt(): array
|
||||
{
|
||||
$temp1 = [
|
||||
0 => [
|
||||
@ -108,7 +108,7 @@ class GisLineStringTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testGenerateParams
|
||||
*/
|
||||
public function providerForTestGenerateParams(): array
|
||||
public static function providerForTestGenerateParams(): array
|
||||
{
|
||||
$temp = [
|
||||
'LINESTRING' => [
|
||||
@ -148,7 +148,7 @@ class GisLineStringTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testScaleRow
|
||||
*/
|
||||
public function providerForTestScaleRow(): array
|
||||
public static function providerForTestScaleRow(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -208,7 +208,7 @@ class GisLineStringTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsPdf() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsPdf(): array
|
||||
public static function providerForPrepareRowAsPdf(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -253,7 +253,7 @@ class GisLineStringTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsSvg() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsSvg(): array
|
||||
public static function providerForPrepareRowAsSvg(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -310,7 +310,7 @@ class GisLineStringTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsOl() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsOl(): array
|
||||
public static function providerForPrepareRowAsOl(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -43,7 +43,7 @@ class GisMultiLineStringTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testGenerateWkt
|
||||
*/
|
||||
public function providerForTestGenerateWkt(): array
|
||||
public static function providerForTestGenerateWkt(): array
|
||||
{
|
||||
$temp = [
|
||||
0 => [
|
||||
@ -175,7 +175,7 @@ class GisMultiLineStringTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testGenerateParams
|
||||
*/
|
||||
public function providerForTestGenerateParams(): array
|
||||
public static function providerForTestGenerateParams(): array
|
||||
{
|
||||
$temp = [
|
||||
'MULTILINESTRING' => [
|
||||
@ -230,7 +230,7 @@ class GisMultiLineStringTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testScaleRow
|
||||
*/
|
||||
public function providerForTestScaleRow(): array
|
||||
public static function providerForTestScaleRow(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -290,7 +290,7 @@ class GisMultiLineStringTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsPdf() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsPdf(): array
|
||||
public static function providerForPrepareRowAsPdf(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -335,7 +335,7 @@ class GisMultiLineStringTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsSvg() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsSvg(): array
|
||||
public static function providerForPrepareRowAsSvg(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -394,7 +394,7 @@ class GisMultiLineStringTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsOl() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsOl(): array
|
||||
public static function providerForPrepareRowAsOl(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -43,7 +43,7 @@ class GisMultiPointTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testGenerateWkt
|
||||
*/
|
||||
public function providerForTestGenerateWkt(): array
|
||||
public static function providerForTestGenerateWkt(): array
|
||||
{
|
||||
$gis_data1 = [
|
||||
0 => [
|
||||
@ -110,7 +110,7 @@ class GisMultiPointTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testGenerateParams
|
||||
*/
|
||||
public function providerForTestGenerateParams(): array
|
||||
public static function providerForTestGenerateParams(): array
|
||||
{
|
||||
$temp1 = [
|
||||
'MULTIPOINT' => [
|
||||
@ -150,7 +150,7 @@ class GisMultiPointTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testScaleRow
|
||||
*/
|
||||
public function providerForTestScaleRow(): array
|
||||
public static function providerForTestScaleRow(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -210,7 +210,7 @@ class GisMultiPointTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsPdf() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsPdf(): array
|
||||
public static function providerForPrepareRowAsPdf(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -255,7 +255,7 @@ class GisMultiPointTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsSvg() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsSvg(): array
|
||||
public static function providerForPrepareRowAsSvg(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -320,7 +320,7 @@ class GisMultiPointTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsOl() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsOl(): array
|
||||
public static function providerForPrepareRowAsOl(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -43,7 +43,7 @@ class GisMultiPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array common data for data providers
|
||||
*/
|
||||
private function getData(): array
|
||||
private static function getData(): array
|
||||
{
|
||||
return [
|
||||
'MULTIPOLYGON' => [
|
||||
@ -124,10 +124,10 @@ class GisMultiPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testGenerateWkt
|
||||
*/
|
||||
public function providerForTestGenerateWkt(): array
|
||||
public static function providerForTestGenerateWkt(): array
|
||||
{
|
||||
$temp = [
|
||||
0 => $this->getData(),
|
||||
0 => self::getData(),
|
||||
];
|
||||
|
||||
$temp1 = $temp;
|
||||
@ -178,11 +178,11 @@ class GisMultiPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testGenerateParams
|
||||
*/
|
||||
public function providerForTestGenerateParams(): array
|
||||
public static function providerForTestGenerateParams(): array
|
||||
{
|
||||
$temp = $this->getData();
|
||||
$temp = self::getData();
|
||||
|
||||
$temp1 = $this->getData();
|
||||
$temp1 = self::getData();
|
||||
$temp1['gis_type'] = 'MULTIPOLYGON';
|
||||
|
||||
return [
|
||||
@ -222,7 +222,7 @@ class GisMultiPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testGetShape
|
||||
*/
|
||||
public function providerForTestGetShape(): array
|
||||
public static function providerForTestGetShape(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -305,7 +305,7 @@ class GisMultiPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testScaleRow
|
||||
*/
|
||||
public function providerForTestScaleRow(): array
|
||||
public static function providerForTestScaleRow(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -375,7 +375,7 @@ class GisMultiPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsPdf() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsPdf(): array
|
||||
public static function providerForPrepareRowAsPdf(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -420,7 +420,7 @@ class GisMultiPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsSvg() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsSvg(): array
|
||||
public static function providerForPrepareRowAsSvg(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -481,7 +481,7 @@ class GisMultiPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsOl() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsOl(): array
|
||||
public static function providerForPrepareRowAsOl(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -41,7 +41,7 @@ class GisPointTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testGenerateWkt
|
||||
*/
|
||||
public function providerForTestGenerateWkt(): array
|
||||
public static function providerForTestGenerateWkt(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -109,7 +109,7 @@ class GisPointTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testGetShape
|
||||
*/
|
||||
public function providerForTestGetShape(): array
|
||||
public static function providerForTestGetShape(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -127,7 +127,7 @@ class GisPointTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testGenerateParams
|
||||
*/
|
||||
public function providerForTestGenerateParams(): array
|
||||
public static function providerForTestGenerateParams(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -164,7 +164,7 @@ class GisPointTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testScaleRow
|
||||
*/
|
||||
public function providerForTestScaleRow(): array
|
||||
public static function providerForTestScaleRow(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -224,7 +224,7 @@ class GisPointTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for prepareRowAsPdf() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsPdf(): array
|
||||
public static function providerForPrepareRowAsPdf(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -276,7 +276,7 @@ class GisPointTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for prepareRowAsSvg() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsSvg(): array
|
||||
public static function providerForPrepareRowAsSvg(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -331,7 +331,7 @@ class GisPointTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsOl() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsOl(): array
|
||||
public static function providerForPrepareRowAsOl(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -43,7 +43,7 @@ class GisPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array common data for data providers
|
||||
*/
|
||||
private function getData(): array
|
||||
private static function getData(): array
|
||||
{
|
||||
return [
|
||||
'POLYGON' => [
|
||||
@ -99,10 +99,10 @@ class GisPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testGenerateWkt
|
||||
*/
|
||||
public function providerForTestGenerateWkt(): array
|
||||
public static function providerForTestGenerateWkt(): array
|
||||
{
|
||||
$temp = [
|
||||
0 => $this->getData(),
|
||||
0 => self::getData(),
|
||||
];
|
||||
|
||||
$temp1 = $temp;
|
||||
@ -164,9 +164,9 @@ class GisPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testGenerateParams
|
||||
*/
|
||||
public function providerForTestGenerateParams(): array
|
||||
public static function providerForTestGenerateParams(): array
|
||||
{
|
||||
$temp = $this->getData();
|
||||
$temp = self::getData();
|
||||
|
||||
$temp1 = $temp;
|
||||
$temp1['gis_type'] = 'POLYGON';
|
||||
@ -206,7 +206,7 @@ class GisPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testArea
|
||||
*/
|
||||
public function providerForTestArea(): array
|
||||
public static function providerForTestArea(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -291,7 +291,7 @@ class GisPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testIsPointInsidePolygon
|
||||
*/
|
||||
public function providerForTestIsPointInsidePolygon(): array
|
||||
public static function providerForTestIsPointInsidePolygon(): array
|
||||
{
|
||||
$ring = [
|
||||
0 => [
|
||||
@ -371,9 +371,9 @@ class GisPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testGetPointOnSurface
|
||||
*/
|
||||
public function providerForTestGetPointOnSurface(): array
|
||||
public static function providerForTestGetPointOnSurface(): array
|
||||
{
|
||||
$temp = $this->getData();
|
||||
$temp = self::getData();
|
||||
unset($temp['POLYGON'][0]['no_of_points']);
|
||||
unset($temp['POLYGON'][1]['no_of_points']);
|
||||
|
||||
@ -392,7 +392,7 @@ class GisPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array data for testScaleRow
|
||||
*/
|
||||
public function providerForTestScaleRow(): array
|
||||
public static function providerForTestScaleRow(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -461,7 +461,7 @@ class GisPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsPdf() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsPdf(): array
|
||||
public static function providerForPrepareRowAsPdf(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -506,7 +506,7 @@ class GisPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsSvg() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsSvg(): array
|
||||
public static function providerForPrepareRowAsSvg(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -564,7 +564,7 @@ class GisPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testPrepareRowAsOl() test case
|
||||
*/
|
||||
public function providerForPrepareRowAsOl(): array
|
||||
public static function providerForPrepareRowAsOl(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -614,7 +614,7 @@ class GisPolygonTest extends GisGeomTestCase
|
||||
*
|
||||
* @return array test data for testIsOuterRing() test case
|
||||
*/
|
||||
public function providerForIsOuterRing(): array
|
||||
public static function providerForIsOuterRing(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -184,7 +184,7 @@ class HeaderTest extends AbstractTestCase
|
||||
$this->assertSame($expected, $headers);
|
||||
}
|
||||
|
||||
public function providerForTestGetHttpHeaders(): array
|
||||
public static function providerForTestGetHttpHeaders(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -9,7 +9,6 @@ use PhpMyAdmin\Html\Generator;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Tests\Stubs\DbiDummy;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Utils\SessionCache;
|
||||
|
||||
@ -204,6 +203,8 @@ class GeneratorTest extends AbstractTestCase
|
||||
*/
|
||||
public function testLinkOrButton(array $params, int $limit, string $match): void
|
||||
{
|
||||
parent::setGlobalConfig();
|
||||
|
||||
$restore = $GLOBALS['cfg']['LinkLengthLimit'] ?? 1000;
|
||||
$GLOBALS['cfg']['LinkLengthLimit'] = $limit;
|
||||
try {
|
||||
@ -225,10 +226,8 @@ class GeneratorTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function linksOrButtons(): array
|
||||
public static function linksOrButtons(): array
|
||||
{
|
||||
parent::setGlobalConfig();
|
||||
|
||||
return [
|
||||
[
|
||||
[
|
||||
@ -298,7 +297,7 @@ class GeneratorTest extends AbstractTestCase
|
||||
],
|
||||
[
|
||||
[
|
||||
Url::getFromRoute('/server/databases'),
|
||||
'index.php?route=/server/databases',
|
||||
['some' => 'parameter'],
|
||||
'text',
|
||||
],
|
||||
@ -307,7 +306,7 @@ class GeneratorTest extends AbstractTestCase
|
||||
],
|
||||
[
|
||||
[
|
||||
Url::getFromRoute('/server/databases'),
|
||||
'index.php?route=/server/databases',
|
||||
null,
|
||||
'text',
|
||||
],
|
||||
@ -316,7 +315,7 @@ class GeneratorTest extends AbstractTestCase
|
||||
],
|
||||
[
|
||||
[
|
||||
Url::getFromRoute('/server/databases'),
|
||||
'index.php?route=/server/databases',
|
||||
['some' => 'parameter'],
|
||||
'text',
|
||||
],
|
||||
@ -325,7 +324,7 @@ class GeneratorTest extends AbstractTestCase
|
||||
],
|
||||
[
|
||||
[
|
||||
Url::getFromRoute('/server/databases'),
|
||||
'index.php?route=/server/databases',
|
||||
null,
|
||||
'text',
|
||||
],
|
||||
@ -493,7 +492,7 @@ class GeneratorTest extends AbstractTestCase
|
||||
* @return array
|
||||
* @psalm-return array<int, array{array<string, string|bool|null>, bool, string}>
|
||||
*/
|
||||
public function providerForTestGetDefaultFunctionForField(): array
|
||||
public static function providerForTestGetDefaultFunctionForField(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -39,7 +39,7 @@ class ServerRequestFactoryTest extends AbstractTestCase
|
||||
],
|
||||
];
|
||||
|
||||
public function dataProviderPsr7Implementations(): array
|
||||
public static function dataProviderPsr7Implementations(): array
|
||||
{
|
||||
return self::IMPLEMENTATION_CLASSES;
|
||||
}
|
||||
@ -114,6 +114,9 @@ class ServerRequestFactoryTest extends AbstractTestCase
|
||||
], $request->getQueryParams());
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testCreateServerRequestFromGlobals(): void
|
||||
{
|
||||
$_GET['foo'] = 'bar';
|
||||
|
||||
@ -152,7 +152,7 @@ class ImportTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provGetColumnAlphaName(): array
|
||||
public static function provGetColumnAlphaName(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -200,7 +200,7 @@ class ImportTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provGetColumnNumberFromName(): array
|
||||
public static function provGetColumnNumberFromName(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -248,7 +248,7 @@ class ImportTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provGetDecimalPrecision(): array
|
||||
public static function provGetDecimalPrecision(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -288,7 +288,7 @@ class ImportTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provGetDecimalScale(): array
|
||||
public static function provGetDecimalScale(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -328,7 +328,7 @@ class ImportTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provGetDecimalSize(): array
|
||||
public static function provGetDecimalSize(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -387,7 +387,7 @@ class ImportTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provDetectType(): array
|
||||
public static function provDetectType(): array
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
@ -493,7 +493,7 @@ class ImportTest extends AbstractTestCase
|
||||
*
|
||||
* @return array[]
|
||||
*/
|
||||
public function providerContentWithByteOrderMarks(): array
|
||||
public static function providerContentWithByteOrderMarks(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -351,7 +351,7 @@ class InsertEditTest extends AbstractTestCase
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
public function dataProviderConfigValueInsertRows(): array
|
||||
public static function dataProviderConfigValueInsertRows(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -1661,7 +1661,7 @@ class InsertEditTest extends AbstractTestCase
|
||||
* @return array
|
||||
* @psalm-return array<string, array{array<string, string|bool|null>, array<bool|string>}>
|
||||
*/
|
||||
public function providerForTestGetSpecialCharsAndBackupFieldForInsertingMode(): array
|
||||
public static function providerForTestGetSpecialCharsAndBackupFieldForInsertingMode(): array
|
||||
{
|
||||
return [
|
||||
'bit' => [
|
||||
|
||||
@ -77,7 +77,7 @@ class IpAllowDenyTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function proxyIPs(): array
|
||||
public static function proxyIPs(): array
|
||||
{
|
||||
return [
|
||||
// Nothing set
|
||||
|
||||
@ -198,7 +198,7 @@ class LanguageTest extends AbstractTestCase
|
||||
*
|
||||
* @return string[][]
|
||||
*/
|
||||
public function selectDataProvider(): array
|
||||
public static function selectDataProvider(): array
|
||||
{
|
||||
return [
|
||||
['cs', 'en', '', '', '', '', '', 'cs'],
|
||||
@ -257,7 +257,7 @@ class LanguageTest extends AbstractTestCase
|
||||
*
|
||||
* @return array with arrays of available locales
|
||||
*/
|
||||
public function listLocales(): array
|
||||
public static function listLocales(): array
|
||||
{
|
||||
$ret = [];
|
||||
foreach (LanguageManager::getInstance()->availableLanguages() as $language) {
|
||||
|
||||
@ -331,7 +331,7 @@ class MessageTest extends AbstractTestCase
|
||||
*
|
||||
* @return array Test data
|
||||
*/
|
||||
public function decodeBBDataProvider(): array
|
||||
public static function decodeBBDataProvider(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -513,7 +513,7 @@ class MessageTest extends AbstractTestCase
|
||||
*
|
||||
* @return array Test-data
|
||||
*/
|
||||
public function providerAffectedRows(): array
|
||||
public static function providerAffectedRows(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -558,7 +558,7 @@ class MessageTest extends AbstractTestCase
|
||||
*
|
||||
* @return array Test-data
|
||||
*/
|
||||
public function providerInsertedRows(): array
|
||||
public static function providerInsertedRows(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -603,7 +603,7 @@ class MessageTest extends AbstractTestCase
|
||||
*
|
||||
* @return array Test-data
|
||||
*/
|
||||
public function providerDeletedRows(): array
|
||||
public static function providerDeletedRows(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -34,7 +34,7 @@ class MimeTest extends AbstractTestCase
|
||||
*
|
||||
* @return array data for testDetect
|
||||
*/
|
||||
public function providerForTestDetect(): array
|
||||
public static function providerForTestDetect(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -48,6 +48,7 @@ class NodeFactoryTest extends AbstractTestCase
|
||||
|
||||
/**
|
||||
* @group with-trigger-error
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testFileError(): void
|
||||
{
|
||||
@ -58,6 +59,7 @@ class NodeFactoryTest extends AbstractTestCase
|
||||
|
||||
/**
|
||||
* @group with-trigger-error
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testClassNameError(): void
|
||||
{
|
||||
|
||||
@ -70,7 +70,7 @@ class NodeTableTest extends AbstractTestCase
|
||||
*
|
||||
* @return array data for testIcon()
|
||||
*/
|
||||
public function providerForTestIcon(): array
|
||||
public static function providerForTestIcon(): array
|
||||
{
|
||||
return [
|
||||
['structure', 'b_props', 'Structure'],
|
||||
|
||||
@ -53,7 +53,7 @@ class OperationsTest extends AbstractTestCase
|
||||
/**
|
||||
* @psalm-return array<string, array{0: string, 1: array<string, string>}>
|
||||
*/
|
||||
public function providerGetPartitionMaintenanceChoices(): array
|
||||
public static function providerGetPartitionMaintenanceChoices(): array
|
||||
{
|
||||
return [
|
||||
'no partition method' => ['no_partition_method', ['COALESCE' => 'Coalesce']],
|
||||
|
||||
@ -149,7 +149,7 @@ class TablePartitionDefinitionTest extends TestCase
|
||||
* 0: string, 1: bool, 2: bool, 3: int, 4: int, 5: array<string, string|array<string, string>[]>[]|null
|
||||
* }>
|
||||
*/
|
||||
public function providerGetDetails(): array
|
||||
public static function providerGetDetails(): array
|
||||
{
|
||||
return [
|
||||
'partition by RANGE' => ['RANGE', true, true, 2, 2, [['name' => 'part0']]],
|
||||
@ -258,7 +258,7 @@ class TablePartitionDefinitionTest extends TestCase
|
||||
/**
|
||||
* @psalm-return array{0: int, 1: string}[]
|
||||
*/
|
||||
public function providerGetDetailsWithMaxPartitions(): array
|
||||
public static function providerGetDetailsWithMaxPartitions(): array
|
||||
{
|
||||
return ['count within the limit' => [8192, '8192'], 'count above the limit' => [8192, '8193']];
|
||||
}
|
||||
|
||||
@ -723,6 +723,9 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase
|
||||
$this->object->rememberCredentials();
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testAuthFailsNoPass(): void
|
||||
{
|
||||
$this->object = $this->getMockBuilder(AuthenticationCookie::class)
|
||||
@ -745,7 +748,7 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function dataProviderPasswordLength(): array
|
||||
public static function dataProviderPasswordLength(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -794,6 +797,9 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase
|
||||
$this->assertEquals($GLOBALS['conn_error'], $connError);
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testAuthFailsDeny(): void
|
||||
{
|
||||
$this->object = $this->getMockBuilder(AuthenticationCookie::class)
|
||||
@ -813,6 +819,9 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase
|
||||
$this->assertEquals($GLOBALS['conn_error'], 'Access denied!');
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testAuthFailsActivity(): void
|
||||
{
|
||||
$this->object = $this->getMockBuilder(AuthenticationCookie::class)
|
||||
@ -838,6 +847,9 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testAuthFailsDBI(): void
|
||||
{
|
||||
$this->object = $this->getMockBuilder(AuthenticationCookie::class)
|
||||
@ -868,6 +880,9 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase
|
||||
$this->assertEquals($GLOBALS['conn_error'], '#42 Cannot log in to the MySQL server');
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testAuthFailsErrno(): void
|
||||
{
|
||||
$this->object = $this->getMockBuilder(AuthenticationCookie::class)
|
||||
@ -1061,7 +1076,7 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function checkRulesProvider(): array
|
||||
public static function checkRulesProvider(): array
|
||||
{
|
||||
return [
|
||||
'nopass-ok' => [
|
||||
|
||||
@ -117,6 +117,9 @@ class AuthenticationHttpTest extends AbstractNetworkTestCase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testAuthLogoutUrl(): void
|
||||
{
|
||||
$_REQUEST['old_usr'] = '1';
|
||||
@ -130,6 +133,9 @@ class AuthenticationHttpTest extends AbstractNetworkTestCase
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testAuthVerbose(): void
|
||||
{
|
||||
$_REQUEST['old_usr'] = '';
|
||||
@ -145,6 +151,9 @@ class AuthenticationHttpTest extends AbstractNetworkTestCase
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testAuthHost(): void
|
||||
{
|
||||
$GLOBALS['cfg']['Server']['verbose'] = '';
|
||||
@ -160,6 +169,9 @@ class AuthenticationHttpTest extends AbstractNetworkTestCase
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testAuthRealm(): void
|
||||
{
|
||||
$GLOBALS['cfg']['Server']['host'] = '';
|
||||
@ -220,7 +232,7 @@ class AuthenticationHttpTest extends AbstractNetworkTestCase
|
||||
*
|
||||
* @return array Test data
|
||||
*/
|
||||
public function readCredentialsProvider(): array
|
||||
public static function readCredentialsProvider(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -167,6 +167,9 @@ class ExportOdsTest extends AbstractTestCase
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testExportFooter(): void
|
||||
{
|
||||
$GLOBALS['ods_buffer'] = 'header';
|
||||
|
||||
@ -290,6 +290,9 @@ class ExportOdtTest extends AbstractTestCase
|
||||
$this->assertStringContainsString('office:version', $GLOBALS['odt_buffer']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testExportFooter(): void
|
||||
{
|
||||
$GLOBALS['odt_buffer'] = 'header';
|
||||
|
||||
@ -748,6 +748,7 @@ class ExportSqlTest extends AbstractTestCase
|
||||
|
||||
/**
|
||||
* @group medium
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testGetTableDef(): void
|
||||
{
|
||||
@ -872,6 +873,9 @@ class ExportSqlTest extends AbstractTestCase
|
||||
$this->assertStringContainsString('DROP FOREIGN KEY', $GLOBALS['sql_drop_foreign_keys']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testGetTableDefWithError(): void
|
||||
{
|
||||
$GLOBALS['sql_compatibility'] = '';
|
||||
|
||||
@ -95,7 +95,7 @@ class TablePropertyTest extends AbstractTestCase
|
||||
*
|
||||
* @return array Test Data
|
||||
*/
|
||||
public function isNotNullProvider(): array
|
||||
public static function isNotNullProvider(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -134,7 +134,7 @@ class TablePropertyTest extends AbstractTestCase
|
||||
*
|
||||
* @return array Test Data
|
||||
*/
|
||||
public function isUniqueProvider(): array
|
||||
public static function isUniqueProvider(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -181,7 +181,7 @@ class TablePropertyTest extends AbstractTestCase
|
||||
*
|
||||
* @return array Test Data
|
||||
*/
|
||||
public function getDotNetPrimitiveTypeProvider(): array
|
||||
public static function getDotNetPrimitiveTypeProvider(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -252,7 +252,7 @@ class TablePropertyTest extends AbstractTestCase
|
||||
*
|
||||
* @return array Test Data
|
||||
*/
|
||||
public function getDotNetObjectTypeProvider(): array
|
||||
public static function getDotNetObjectTypeProvider(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -128,7 +128,7 @@ class ImportOdsTest extends AbstractTestCase
|
||||
$this->assertTrue($GLOBALS['finished']);
|
||||
}
|
||||
|
||||
public function dataProviderOdsEmptyRows(): array
|
||||
public static function dataProviderOdsEmptyRows(): array
|
||||
{
|
||||
return [
|
||||
'remove empty columns' => [true],
|
||||
|
||||
@ -67,7 +67,7 @@ class TransformationPluginsTest extends AbstractTestCase
|
||||
/**
|
||||
* Data provider for testGetMulti
|
||||
*/
|
||||
public function multiDataProvider(): array
|
||||
public static function multiDataProvider(): array
|
||||
{
|
||||
$GLOBALS['cfg']['CodemirrorEnable'] = false;
|
||||
|
||||
@ -726,7 +726,7 @@ class TransformationPluginsTest extends AbstractTestCase
|
||||
/**
|
||||
* Data provider for testTransformation
|
||||
*/
|
||||
public function transformationDataProvider(): array
|
||||
public static function transformationDataProvider(): array
|
||||
{
|
||||
$GLOBALS['cfg']['CodemirrorEnable'] = false;
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ class PluginsTest extends AbstractTestCase
|
||||
* @return array[]
|
||||
* @psalm-return array{array{string, string|int|null, string|null, 'Export'|'Import'|'Schema', string, bool|null}}
|
||||
*/
|
||||
public function providerForTestGetDefault(): array
|
||||
public static function providerForTestGetDefault(): array
|
||||
{
|
||||
return [
|
||||
['xml', 'xml', null, 'Export', 'format', null],
|
||||
|
||||
@ -25,7 +25,7 @@ class CompatibilityTest extends TestCase
|
||||
* @return array[]
|
||||
* @psalm-return array<string, array{bool, bool, int}>
|
||||
*/
|
||||
public function providerForTestHasAccountLocking(): array
|
||||
public static function providerForTestHasAccountLocking(): array
|
||||
{
|
||||
return [
|
||||
'MySQL 5.7.5' => [false, false, 50705],
|
||||
@ -54,7 +54,7 @@ class CompatibilityTest extends TestCase
|
||||
* @return array[]
|
||||
* @psalm-return array<string, array{bool, bool, int}>
|
||||
*/
|
||||
public function providerForTestIsUUIDSupported(): array
|
||||
public static function providerForTestIsUUIDSupported(): array
|
||||
{
|
||||
return [
|
||||
'MySQL 5.7.5' => [false, false, 50705],
|
||||
|
||||
@ -71,7 +71,7 @@ class SanitizeTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function docLinks(): array
|
||||
public static function docLinks(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -214,7 +214,7 @@ class SanitizeTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function variables(): array
|
||||
public static function variables(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -273,7 +273,7 @@ class SanitizeTest extends AbstractTestCase
|
||||
*
|
||||
* @return array data for testEscape test case
|
||||
*/
|
||||
public function escapeDataProvider(): array
|
||||
public static function escapeDataProvider(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -327,7 +327,7 @@ class SanitizeTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function dataProviderCheckLinks(): array
|
||||
public static function dataProviderCheckLinks(): array
|
||||
{
|
||||
// Expected
|
||||
// The url
|
||||
|
||||
@ -14,6 +14,9 @@ use Throwable;
|
||||
*/
|
||||
class AccountLockingTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testLockWithValidAccount(): void
|
||||
{
|
||||
$dbi = $this->createMock(DatabaseInterface::class);
|
||||
@ -33,6 +36,9 @@ class AccountLockingTest extends TestCase
|
||||
$accountLocking->lock('test.user', 'test.host');
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testLockWithInvalidAccount(): void
|
||||
{
|
||||
$dbi = $this->createMock(DatabaseInterface::class);
|
||||
@ -73,6 +79,9 @@ class AccountLockingTest extends TestCase
|
||||
$accountLocking->lock('test.user', 'test.host');
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testUnlockWithValidAccount(): void
|
||||
{
|
||||
$dbi = $this->createMock(DatabaseInterface::class);
|
||||
@ -92,6 +101,9 @@ class AccountLockingTest extends TestCase
|
||||
$accountLocking->unlock('test.user', 'test.host');
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testUnlockWithInvalidAccount(): void
|
||||
{
|
||||
$dbi = $this->createMock(DatabaseInterface::class);
|
||||
|
||||
@ -1700,23 +1700,23 @@ class PrivilegesTest extends AbstractTestCase
|
||||
'<a class="page-link" href="#" tabindex="-1" aria-disabled="true">Z</a>',
|
||||
$actual
|
||||
);
|
||||
$this->assertMatchesRegularExpression(
|
||||
$this->assertMatchesRegularExpressionCompat(
|
||||
'/<a class="page-link" href="index.php\?route=\/server\/privileges&initial=-&lang=en">\s*-\s*<\/a>/',
|
||||
$actual
|
||||
);
|
||||
$this->assertMatchesRegularExpression(
|
||||
$this->assertMatchesRegularExpressionCompat(
|
||||
'/<a class="page-link" href="index.php\?route=\/server\/privileges&initial=%22&lang=en">\s*"\s*<\/a>/',
|
||||
$actual
|
||||
);
|
||||
$this->assertMatchesRegularExpression(
|
||||
$this->assertMatchesRegularExpressionCompat(
|
||||
'/<a class="page-link" href="index.php\?route=\/server\/privileges&initial=%25&lang=en">\s*%\s*<\/a>/',
|
||||
$actual
|
||||
);
|
||||
$this->assertMatchesRegularExpression(
|
||||
$this->assertMatchesRegularExpressionCompat(
|
||||
'/<a class="page-link" href="index.php\?route=\/server\/privileges&initial=%5C&lang=en">\s*\\\\\s*<\/a>/',
|
||||
$actual
|
||||
);
|
||||
$this->assertMatchesRegularExpression(
|
||||
$this->assertMatchesRegularExpressionCompat(
|
||||
'/<a class="page-link" href="index.php\?route=\/server\/privileges&initial=&lang=en">\s*' .
|
||||
'<span class="text-danger text-nowrap">' . preg_quote(__('Any')) . '<\/span>' .
|
||||
'\s*<\/a>/',
|
||||
@ -1886,6 +1886,9 @@ class PrivilegesTest extends AbstractTestCase
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testGetUserPrivileges(): void
|
||||
{
|
||||
$mysqliResultStub = $this->createMock(mysqli_result::class);
|
||||
|
||||
@ -103,7 +103,7 @@ class SelectTest extends AbstractTestCase
|
||||
$this->assertStringContainsString($server['user'], $html);
|
||||
}
|
||||
|
||||
public function renderDataProvider(): array
|
||||
public static function renderDataProvider(): array
|
||||
{
|
||||
return [
|
||||
'only options, don\'t omit fieldset' => [
|
||||
|
||||
@ -32,7 +32,7 @@ class SysInfoTest extends AbstractTestCase
|
||||
/**
|
||||
* Data provider for OS detection tests.
|
||||
*/
|
||||
public function sysInfoOsProvider(): array
|
||||
public static function sysInfoOsProvider(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -32,6 +32,8 @@ class FormProcessingTest extends AbstractNetworkTestCase
|
||||
|
||||
/**
|
||||
* Test for process_formset()
|
||||
*
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testProcessFormSet(): void
|
||||
{
|
||||
|
||||
@ -354,7 +354,7 @@ class SqlTest extends AbstractTestCase
|
||||
return $analyzedSqlResults;
|
||||
}
|
||||
|
||||
public function dataProviderCountQueryResults(): array
|
||||
public static function dataProviderCountQueryResults(): array
|
||||
{
|
||||
// sql query
|
||||
// session tmpval
|
||||
|
||||
@ -122,7 +122,7 @@ class StorageEngineTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetEngine(): array
|
||||
public static function providerGetEngine(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -35,7 +35,7 @@ class ColumnsDefinitionTest extends AbstractTestCase
|
||||
* @return array
|
||||
* @psalm-return array<string, array{array<string, string|null>, array<string, string>}>
|
||||
*/
|
||||
public function providerColumnMetaDefault(): array
|
||||
public static function providerColumnMetaDefault(): array
|
||||
{
|
||||
return [
|
||||
'when Default is null and Null is YES' => [
|
||||
|
||||
@ -30,7 +30,7 @@ class MessageTest extends TestCase
|
||||
* @return array<int|string, array<int, array<string, mixed>|string>>
|
||||
* @psalm-return array{mixed[], string, string, string, string}[]
|
||||
*/
|
||||
public function providerForTestFromArray(): array
|
||||
public static function providerForTestFromArray(): array
|
||||
{
|
||||
return [
|
||||
[[], '', '', '', ''],
|
||||
|
||||
@ -391,7 +391,7 @@ class TableTest extends AbstractTestCase
|
||||
/**
|
||||
* Data provider for name validation
|
||||
*/
|
||||
public function dataValidateName(): array
|
||||
public static function dataValidateName(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -67,7 +67,7 @@ class TemplateTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerTestSet(): array
|
||||
public static function providerTestSet(): array
|
||||
{
|
||||
return [
|
||||
['test/add_data'],
|
||||
@ -96,7 +96,7 @@ class TemplateTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerTestDynamicRender(): array
|
||||
public static function providerTestDynamicRender(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -137,7 +137,7 @@ class TemplateTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerTestRender(): array
|
||||
public static function providerTestRender(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -169,7 +169,7 @@ class TemplateTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerTestRenderGettext(): array
|
||||
public static function providerTestRenderGettext(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -242,7 +242,7 @@ class ThemeTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerForGetImgPath(): array
|
||||
public static function providerForGetImgPath(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -117,7 +117,7 @@ class TrackerTest extends AbstractTestCase
|
||||
*
|
||||
* @return array Test data
|
||||
*/
|
||||
public function getTableNameData(): array
|
||||
public static function getTableNameData(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -189,6 +189,8 @@ class TrackerTest extends AbstractTestCase
|
||||
|
||||
/**
|
||||
* Test for Tracker::createVersion()
|
||||
*
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testCreateVersion(): void
|
||||
{
|
||||
@ -524,7 +526,7 @@ class TrackerTest extends AbstractTestCase
|
||||
*
|
||||
* @return array Test data
|
||||
*/
|
||||
public function getTrackedDataProvider(): array
|
||||
public static function getTrackedDataProvider(): array
|
||||
{
|
||||
$fetchArrayReturn = [
|
||||
[
|
||||
@ -654,7 +656,7 @@ class TrackerTest extends AbstractTestCase
|
||||
*
|
||||
* @return array Test data
|
||||
*/
|
||||
public function parseQueryData(): array
|
||||
public static function parseQueryData(): array
|
||||
{
|
||||
// query
|
||||
// type
|
||||
|
||||
@ -60,7 +60,7 @@ class TransformationsTest extends AbstractTestCase
|
||||
/**
|
||||
* Data provided for parsing options
|
||||
*/
|
||||
public function getOptionsData(): array
|
||||
public static function getOptionsData(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -275,7 +275,7 @@ class TransformationsTest extends AbstractTestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function fixupData(): array
|
||||
public static function fixupData(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -317,7 +317,7 @@ class TransformationsTest extends AbstractTestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function providerGetDescription(): array
|
||||
public static function providerGetDescription(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -351,7 +351,7 @@ class TransformationsTest extends AbstractTestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function providerGetName(): array
|
||||
public static function providerGetName(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -84,7 +84,7 @@ class TypesByDatabaseVersionTest extends AbstractTestCase
|
||||
*
|
||||
* @psalm-return array<string, array{string, int, string, array<string>, array<string>}>
|
||||
*/
|
||||
public function providerFortTestGetFunctionsClass(): array
|
||||
public static function providerFortTestGetFunctionsClass(): array
|
||||
{
|
||||
return [
|
||||
'mysql 5.1.0 - CHAR - not support INET6 Converter' => [
|
||||
@ -304,7 +304,7 @@ class TypesByDatabaseVersionTest extends AbstractTestCase
|
||||
*
|
||||
* @psalm-return array<string, array{string, int, array<string>, array<string>}>
|
||||
*/
|
||||
public function providerFortTestGetFunctions(): array
|
||||
public static function providerFortTestGetFunctions(): array
|
||||
{
|
||||
return [
|
||||
'mysql 5.1.0 - not support INET6 Converter' => [
|
||||
@ -380,7 +380,7 @@ class TypesByDatabaseVersionTest extends AbstractTestCase
|
||||
*
|
||||
* @psalm-return array<string, array{string, int, array<string>, array<string>}>
|
||||
*/
|
||||
public function providerFortTestGetAllFunctions(): array
|
||||
public static function providerFortTestGetAllFunctions(): array
|
||||
{
|
||||
return [
|
||||
'mysql 5.1.0 - not support INET6_ATON, ST_Geometry' => [
|
||||
@ -626,7 +626,7 @@ class TypesByDatabaseVersionTest extends AbstractTestCase
|
||||
*
|
||||
* @psalm-return array<string, array{string, int, array<int|string, array<int, string>|string>}>
|
||||
*/
|
||||
public function providerFortTestGetColumns(): array
|
||||
public static function providerFortTestGetColumns(): array
|
||||
{
|
||||
return [
|
||||
'mysql 5.1.0 - not support INET6, JSON and UUID' => [
|
||||
|
||||
@ -172,7 +172,7 @@ class TypesTest extends AbstractTestCase
|
||||
*
|
||||
* @return array data for testGetTypeOperators
|
||||
*/
|
||||
public function providerForGetTypeOperators(): array
|
||||
public static function providerForGetTypeOperators(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -274,7 +274,7 @@ class TypesTest extends AbstractTestCase
|
||||
*
|
||||
* @return array test data for getTypeOperatorsHtml
|
||||
*/
|
||||
public function providerForTestGetTypeOperatorsHtml(): array
|
||||
public static function providerForTestGetTypeOperatorsHtml(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -317,7 +317,7 @@ class TypesTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerForTestGetTypeDescription(): array
|
||||
public static function providerForTestGetTypeDescription(): array
|
||||
{
|
||||
return [
|
||||
['TINYINT'],
|
||||
@ -382,7 +382,7 @@ class TypesTest extends AbstractTestCase
|
||||
/**
|
||||
* Data provider for testing function lists
|
||||
*/
|
||||
public function providerFortTestGetFunctionsClass(): array
|
||||
public static function providerFortTestGetFunctionsClass(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -812,7 +812,7 @@ class TypesTest extends AbstractTestCase
|
||||
*
|
||||
* @return array for testing type detection
|
||||
*/
|
||||
public function providerFortTestGetTypeClass(): array
|
||||
public static function providerFortTestGetTypeClass(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -218,7 +218,7 @@ class UrlTest extends AbstractTestCase
|
||||
$this->assertSame('0', $queryParams['pos']);
|
||||
$this->assertTrue(is_string($queryParams['eq']));
|
||||
$this->assertNotSame('', $queryParams['eq']);
|
||||
$this->assertMatchesRegularExpression('/^[a-zA-Z0-9-_=]+$/', $queryParams['eq']);
|
||||
$this->assertMatchesRegularExpressionCompat('/^[a-zA-Z0-9-_=]+$/', $queryParams['eq']);
|
||||
|
||||
$decrypted = Url::decryptQuery($queryParams['eq']);
|
||||
$this->assertNotNull($decrypted);
|
||||
@ -241,7 +241,7 @@ class UrlTest extends AbstractTestCase
|
||||
$encrypted = Url::encryptQuery($query);
|
||||
$this->assertNotSame($query, $encrypted);
|
||||
$this->assertNotSame('', $encrypted);
|
||||
$this->assertMatchesRegularExpression('/^[a-zA-Z0-9-_=]+$/', $encrypted);
|
||||
$this->assertMatchesRegularExpressionCompat('/^[a-zA-Z0-9-_=]+$/', $encrypted);
|
||||
|
||||
$decrypted = Url::decryptQuery($encrypted);
|
||||
$this->assertSame($query, $decrypted);
|
||||
|
||||
@ -56,7 +56,7 @@ class UserPasswordTest extends AbstractTestCase
|
||||
/**
|
||||
* @psalm-return array{0: bool, 1: Message, 2: string, 3: string, 4: string}[]
|
||||
*/
|
||||
public function providerSetChangePasswordMsg(): array
|
||||
public static function providerSetChangePasswordMsg(): array
|
||||
{
|
||||
return [
|
||||
[false, Message::success('The profile has been updated.'), '1', '', ''],
|
||||
|
||||
@ -290,7 +290,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array<string, array{FieldMetadata[], array<int, mixed>, array{string, bool, array<string, string>}}>
|
||||
*/
|
||||
public function providerGetUniqueConditionForGroupFlag(): array
|
||||
public static function providerGetUniqueConditionForGroupFlag(): array
|
||||
{
|
||||
return [
|
||||
'field type is integer, value is number - not escape string' => [
|
||||
@ -432,7 +432,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array test data
|
||||
*/
|
||||
public function charsetQueryData(): array
|
||||
public static function charsetQueryData(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -546,7 +546,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerConvertBitDefaultValue(): array
|
||||
public static function providerConvertBitDefaultValue(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -589,7 +589,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerUnEscapeMysqlWildcards(): array
|
||||
public static function providerUnEscapeMysqlWildcards(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -698,7 +698,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerExpandUserString(): array
|
||||
public static function providerExpandUserString(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -751,7 +751,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerExtractColumnSpec(): array
|
||||
public static function providerExtractColumnSpec(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -910,7 +910,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return iterable<int, array{string, bool, string[]}>
|
||||
*/
|
||||
public function providerParseEnumSetValues(): iterable
|
||||
public static function providerParseEnumSetValues(): iterable
|
||||
{
|
||||
$enumSpec = "enum('a&b','b''c''d','e\\f')";
|
||||
|
||||
@ -1031,7 +1031,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerExtractValueFromFormattedSize(): array
|
||||
public static function providerExtractValueFromFormattedSize(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -1076,7 +1076,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerFormatByteDown(): array
|
||||
public static function providerFormatByteDown(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -1323,7 +1323,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerFormatNumber(): array
|
||||
public static function providerFormatNumber(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -1459,7 +1459,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetFormattedMaximumUploadSize(): array
|
||||
public static function providerGetFormattedMaximumUploadSize(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -1538,7 +1538,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerGetTitleForTarget(): array
|
||||
public static function providerGetTitleForTarget(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -1601,7 +1601,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerLocalisedDate(): array
|
||||
public static function providerLocalisedDate(): array
|
||||
{
|
||||
$hasJaTranslations = file_exists(LOCALE_PATH . '/cs/LC_MESSAGES/phpmyadmin.mo');
|
||||
|
||||
@ -1734,7 +1734,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerTimespanFormat(): array
|
||||
public static function providerTimespanFormat(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -1770,7 +1770,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerPrintableBitValue(): array
|
||||
public static function providerPrintableBitValue(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -1807,7 +1807,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerUnQuote(): array
|
||||
public static function providerUnQuote(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -1850,7 +1850,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerUnQuoteSelectedChar(): array
|
||||
public static function providerUnQuoteSelectedChar(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -1887,7 +1887,7 @@ class UtilTest extends AbstractTestCase
|
||||
/**
|
||||
* @return array<int|string, string|null>[]
|
||||
*/
|
||||
public function providerForTestBackquote(): array
|
||||
public static function providerForTestBackquote(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -1968,7 +1968,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerUserDir(): array
|
||||
public static function providerUserDir(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -2003,7 +2003,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerDuplicateFirstNewline(): array
|
||||
public static function providerDuplicateFirstNewline(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -2061,7 +2061,7 @@ class UtilTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerIsInteger(): array
|
||||
public static function providerIsInteger(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -2109,7 +2109,7 @@ class UtilTest extends AbstractTestCase
|
||||
* @source https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded MDN docs
|
||||
* @source https://www.nginx.com/resources/wiki/start/topics/examples/forwarded/ Nginx docs
|
||||
*/
|
||||
public function providerForwardedHeaders(): array
|
||||
public static function providerForwardedHeaders(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -2262,6 +2262,9 @@ class UtilTest extends AbstractTestCase
|
||||
$GLOBALS['dbi'] = $oldDbi;
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testCurrentUserHasNotUserPrivilegeButDbPrivilege(): void
|
||||
{
|
||||
$dbi = $this->getMockBuilder(DatabaseInterface::class)
|
||||
@ -2293,6 +2296,9 @@ class UtilTest extends AbstractTestCase
|
||||
$GLOBALS['dbi'] = $oldDbi;
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testCurrentUserHasNotUserPrivilegeAndNotDbPrivilege(): void
|
||||
{
|
||||
$dbi = $this->getMockBuilder(DatabaseInterface::class)
|
||||
@ -2324,6 +2330,9 @@ class UtilTest extends AbstractTestCase
|
||||
$GLOBALS['dbi'] = $oldDbi;
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testCurrentUserHasNotUserPrivilegeAndNotDbPrivilegeButTablePrivilege(): void
|
||||
{
|
||||
$dbi = $this->getMockBuilder(DatabaseInterface::class)
|
||||
@ -2360,6 +2369,9 @@ class UtilTest extends AbstractTestCase
|
||||
$GLOBALS['dbi'] = $oldDbi;
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHPUnit < 10
|
||||
*/
|
||||
public function testCurrentUserHasNotUserPrivilegeAndNotDbPrivilegeAndNotTablePrivilege(): void
|
||||
{
|
||||
$dbi = $this->getMockBuilder(DatabaseInterface::class)
|
||||
@ -2399,7 +2411,7 @@ class UtilTest extends AbstractTestCase
|
||||
/**
|
||||
* @return array[]
|
||||
*/
|
||||
public function dataProviderScriptNames(): array
|
||||
public static function dataProviderScriptNames(): array
|
||||
{
|
||||
// target
|
||||
// location
|
||||
@ -2604,7 +2616,7 @@ class UtilTest extends AbstractTestCase
|
||||
* @return array
|
||||
* @psalm-return array<int, array{bool, int, bool}>
|
||||
*/
|
||||
public function provideForTestIsUUIDSupported(): array
|
||||
public static function provideForTestIsUUIDSupported(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -36,7 +36,7 @@ class ForeignKeyTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerIsSupported(): array
|
||||
public static function providerIsSupported(): array
|
||||
{
|
||||
return [
|
||||
['MyISAM', false],
|
||||
@ -69,7 +69,7 @@ class ForeignKeyTest extends AbstractTestCase
|
||||
/**
|
||||
* @return array[]
|
||||
*/
|
||||
public function providerCheckInit(): array
|
||||
public static function providerCheckInit(): array
|
||||
{
|
||||
return [
|
||||
['', 'OFF'],
|
||||
@ -129,7 +129,7 @@ class ForeignKeyTest extends AbstractTestCase
|
||||
/**
|
||||
* @return array[]
|
||||
*/
|
||||
public function providerCheckCleanup(): array
|
||||
public static function providerCheckCleanup(): array
|
||||
{
|
||||
return [
|
||||
[true, 'ON'],
|
||||
|
||||
@ -34,7 +34,7 @@ class FormatConverterTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerBinaryToIp(): array
|
||||
public static function providerBinaryToIp(): array
|
||||
{
|
||||
// expected
|
||||
// input
|
||||
@ -102,7 +102,7 @@ class FormatConverterTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerIpToBinary(): array
|
||||
public static function providerIpToBinary(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -135,7 +135,7 @@ class FormatConverterTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerIpToLong(): array
|
||||
public static function providerIpToLong(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -168,7 +168,7 @@ class FormatConverterTest extends AbstractTestCase
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerLongToIp(): array
|
||||
public static function providerLongToIp(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
@ -65,7 +65,7 @@ class GisTest extends AbstractTestCase
|
||||
));
|
||||
}
|
||||
|
||||
public function providerConvertToWellKnownText(): array
|
||||
public static function providerConvertToWellKnownText(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user