Call PHPUnit static methods using static calls

Replaces $this->method() with self::method().

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2024-01-12 14:03:46 -03:00
parent ac325d20ff
commit ba72f543fd
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
385 changed files with 6674 additions and 6686 deletions

View File

@ -15846,52 +15846,52 @@ parameters:
path: src/ZipExtension.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'formula' and array\\{id\\: non\\-empty\\-string, name\\: string, precondition\\?\\: non\\-empty\\-string, formula\\: non\\-empty\\-string, test\\: non\\-empty\\-string, issue\\: string, recommendation\\: string, justification\\: string, \\.\\.\\.\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'formula' and array\\{id\\: non\\-empty\\-string, name\\: string, precondition\\?\\: non\\-empty\\-string, formula\\: non\\-empty\\-string, test\\: non\\-empty\\-string, issue\\: string, recommendation\\: string, justification\\: string, \\.\\.\\.\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/Advisory/RulesTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'id' and array\\{id\\: non\\-empty\\-string, name\\: string, precondition\\?\\: non\\-empty\\-string, formula\\: non\\-empty\\-string, test\\: non\\-empty\\-string, issue\\: string, recommendation\\: string, justification\\: string, \\.\\.\\.\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'id' and array\\{id\\: non\\-empty\\-string, name\\: string, precondition\\?\\: non\\-empty\\-string, formula\\: non\\-empty\\-string, test\\: non\\-empty\\-string, issue\\: string, recommendation\\: string, justification\\: string, \\.\\.\\.\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/Advisory/RulesTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'issue' and array\\{id\\: non\\-empty\\-string, name\\: string, precondition\\?\\: non\\-empty\\-string, formula\\: non\\-empty\\-string, test\\: non\\-empty\\-string, issue\\: string, recommendation\\: string, justification\\: string, \\.\\.\\.\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'issue' and array\\{id\\: non\\-empty\\-string, name\\: string, precondition\\?\\: non\\-empty\\-string, formula\\: non\\-empty\\-string, test\\: non\\-empty\\-string, issue\\: string, recommendation\\: string, justification\\: string, \\.\\.\\.\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/Advisory/RulesTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'justification' and array\\{id\\: non\\-empty\\-string, name\\: string, precondition\\?\\: non\\-empty\\-string, formula\\: non\\-empty\\-string, test\\: non\\-empty\\-string, issue\\: string, recommendation\\: string, justification\\: string, \\.\\.\\.\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'justification' and array\\{id\\: non\\-empty\\-string, name\\: string, precondition\\?\\: non\\-empty\\-string, formula\\: non\\-empty\\-string, test\\: non\\-empty\\-string, issue\\: string, recommendation\\: string, justification\\: string, \\.\\.\\.\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/Advisory/RulesTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'name' and array\\{id\\: non\\-empty\\-string, name\\: string, precondition\\?\\: non\\-empty\\-string, formula\\: non\\-empty\\-string, test\\: non\\-empty\\-string, issue\\: string, recommendation\\: string, justification\\: string, \\.\\.\\.\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'name' and array\\{id\\: non\\-empty\\-string, name\\: string, precondition\\?\\: non\\-empty\\-string, formula\\: non\\-empty\\-string, test\\: non\\-empty\\-string, issue\\: string, recommendation\\: string, justification\\: string, \\.\\.\\.\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/Advisory/RulesTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'recommendation' and array\\{id\\: non\\-empty\\-string, name\\: string, precondition\\?\\: non\\-empty\\-string, formula\\: non\\-empty\\-string, test\\: non\\-empty\\-string, issue\\: string, recommendation\\: string, justification\\: string, \\.\\.\\.\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'recommendation' and array\\{id\\: non\\-empty\\-string, name\\: string, precondition\\?\\: non\\-empty\\-string, formula\\: non\\-empty\\-string, test\\: non\\-empty\\-string, issue\\: string, recommendation\\: string, justification\\: string, \\.\\.\\.\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/Advisory/RulesTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'test' and array\\{id\\: non\\-empty\\-string, name\\: string, precondition\\?\\: non\\-empty\\-string, formula\\: non\\-empty\\-string, test\\: non\\-empty\\-string, issue\\: string, recommendation\\: string, justification\\: string, \\.\\.\\.\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'test' and array\\{id\\: non\\-empty\\-string, name\\: string, precondition\\?\\: non\\-empty\\-string, formula\\: non\\-empty\\-string, test\\: non\\-empty\\-string, issue\\: string, recommendation\\: string, justification\\: string, \\.\\.\\.\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/Advisory/RulesTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 3
path: tests/classes/BrowseForeignersTest.php
-
message: "#^Parameter \\#2 \\$string of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringEndsWith\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$string of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringEndsWith\\(\\) expects string, mixed given\\.$#"
count: 1
path: tests/classes/BrowseForeignersTest.php
-
message: "#^Parameter \\#2 \\$string of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringStartsWith\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$string of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringStartsWith\\(\\) expects string, mixed given\\.$#"
count: 1
path: tests/classes/BrowseForeignersTest.php
@ -15901,12 +15901,12 @@ parameters:
path: tests/classes/CacheTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Charsets\\\\\\\\Charset' and PhpMyAdmin\\\\Charsets\\\\Charset will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Charsets\\\\\\\\Charset' and PhpMyAdmin\\\\Charsets\\\\Charset will always evaluate to true\\.$#"
count: 1
path: tests/classes/Charsets/CharsetTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Charsets\\\\\\\\Collation' and PhpMyAdmin\\\\Charsets\\\\Collation will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Charsets\\\\\\\\Collation' and PhpMyAdmin\\\\Charsets\\\\Collation will always evaluate to true\\.$#"
count: 1
path: tests/classes/Charsets/CollationTest.php
@ -15946,27 +15946,27 @@ parameters:
path: tests/classes/Config/DescriptionTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array\\<int\\<1, max\\>, non\\-empty\\-array\\<'AllowDeny'\\|'AllowNoPassword'\\|'AllowRoot'\\|'auth_http_realm'\\|'auth_type'\\|'bookmarktable'\\|'central_columns'\\|'column_info'\\|'compress'\\|'control_compress'\\|'control_hide…'\\|'control_socket'\\|'control_ssl'\\|'control_ssl_ca'\\|'control_ssl_ca_path'\\|'control_ssl_cert'\\|'control_ssl_ciphers'\\|'control_ssl_key'\\|'control_ssl_verify'\\|'controlhost'\\|'controlpass'\\|'controlport'\\|'controluser'\\|'designer_settings'\\|'DisableIS'\\|'export_templates'\\|'favorite'\\|'hide_db'\\|'history'\\|'host'\\|'LogoutURL'\\|'MaxTableUiprefs'\\|'navigationhiding'\\|'only_db'\\|'password'\\|'pdf_pages'\\|'pmadb'\\|'port'\\|'recent'\\|'relation'\\|'savedsearches'\\|'SessionTimeZone'\\|'SignonCookieParams'\\|'SignonScript'\\|'SignonSession'\\|'SignonURL'\\|'socket'\\|'ssl'\\|'ssl_ca'\\|'ssl_ca_path'\\|'ssl_cert'\\|'ssl_ciphers'\\|'ssl_key'\\|'ssl_verify'\\|'table_coords'\\|'table_info'\\|'table_uiprefs'\\|'tracking'\\|'user'\\|'userconfig'\\|'usergroups'\\|'users'\\|'verbose', array\\<array\\<string\\>\\|bool\\|int\\<0, max\\>\\|string\\>\\|bool\\|int\\<1, max\\>\\|string\\|null\\>\\> will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array\\<int\\<1, max\\>, non\\-empty\\-array\\<'AllowDeny'\\|'AllowNoPassword'\\|'AllowRoot'\\|'auth_http_realm'\\|'auth_type'\\|'bookmarktable'\\|'central_columns'\\|'column_info'\\|'compress'\\|'control_compress'\\|'control_hide…'\\|'control_socket'\\|'control_ssl'\\|'control_ssl_ca'\\|'control_ssl_ca_path'\\|'control_ssl_cert'\\|'control_ssl_ciphers'\\|'control_ssl_key'\\|'control_ssl_verify'\\|'controlhost'\\|'controlpass'\\|'controlport'\\|'controluser'\\|'designer_settings'\\|'DisableIS'\\|'export_templates'\\|'favorite'\\|'hide_db'\\|'history'\\|'host'\\|'LogoutURL'\\|'MaxTableUiprefs'\\|'navigationhiding'\\|'only_db'\\|'password'\\|'pdf_pages'\\|'pmadb'\\|'port'\\|'recent'\\|'relation'\\|'savedsearches'\\|'SessionTimeZone'\\|'SignonCookieParams'\\|'SignonScript'\\|'SignonSession'\\|'SignonURL'\\|'socket'\\|'ssl'\\|'ssl_ca'\\|'ssl_ca_path'\\|'ssl_cert'\\|'ssl_ciphers'\\|'ssl_key'\\|'ssl_verify'\\|'table_coords'\\|'table_info'\\|'table_uiprefs'\\|'tracking'\\|'user'\\|'userconfig'\\|'usergroups'\\|'users'\\|'verbose', array\\<array\\<string\\>\\|bool\\|int\\<0, max\\>\\|string\\>\\|bool\\|int\\<1, max\\>\\|string\\|null\\>\\> will always evaluate to true\\.$#"
count: 1
path: tests/classes/Config/DescriptionTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with non\\-empty\\-array\\<'AllowDeny'\\|'AllowNoPassword'\\|'AllowRoot'\\|'auth_http_realm'\\|'auth_type'\\|'bookmarktable'\\|'central_columns'\\|'column_info'\\|'compress'\\|'control_compress'\\|'control_hide…'\\|'control_socket'\\|'control_ssl'\\|'control_ssl_ca'\\|'control_ssl_ca_path'\\|'control_ssl_cert'\\|'control_ssl_ciphers'\\|'control_ssl_key'\\|'control_ssl_verify'\\|'controlhost'\\|'controlpass'\\|'controlport'\\|'controluser'\\|'designer_settings'\\|'DisableIS'\\|'export_templates'\\|'favorite'\\|'hide_db'\\|'history'\\|'host'\\|'LogoutURL'\\|'MaxTableUiprefs'\\|'navigationhiding'\\|'only_db'\\|'password'\\|'pdf_pages'\\|'pmadb'\\|'port'\\|'recent'\\|'relation'\\|'savedsearches'\\|'SessionTimeZone'\\|'SignonCookieParams'\\|'SignonScript'\\|'SignonSession'\\|'SignonURL'\\|'socket'\\|'ssl'\\|'ssl_ca'\\|'ssl_ca_path'\\|'ssl_cert'\\|'ssl_ciphers'\\|'ssl_key'\\|'ssl_verify'\\|'table_coords'\\|'table_info'\\|'table_uiprefs'\\|'tracking'\\|'user'\\|'userconfig'\\|'usergroups'\\|'users'\\|'verbose', array\\<array\\<string\\>\\|bool\\|int\\<0, max\\>\\|string\\>\\|bool\\|int\\<1, max\\>\\|string\\|null\\> will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with non\\-empty\\-array\\<'AllowDeny'\\|'AllowNoPassword'\\|'AllowRoot'\\|'auth_http_realm'\\|'auth_type'\\|'bookmarktable'\\|'central_columns'\\|'column_info'\\|'compress'\\|'control_compress'\\|'control_hide…'\\|'control_socket'\\|'control_ssl'\\|'control_ssl_ca'\\|'control_ssl_ca_path'\\|'control_ssl_cert'\\|'control_ssl_ciphers'\\|'control_ssl_key'\\|'control_ssl_verify'\\|'controlhost'\\|'controlpass'\\|'controlport'\\|'controluser'\\|'designer_settings'\\|'DisableIS'\\|'export_templates'\\|'favorite'\\|'hide_db'\\|'history'\\|'host'\\|'LogoutURL'\\|'MaxTableUiprefs'\\|'navigationhiding'\\|'only_db'\\|'password'\\|'pdf_pages'\\|'pmadb'\\|'port'\\|'recent'\\|'relation'\\|'savedsearches'\\|'SessionTimeZone'\\|'SignonCookieParams'\\|'SignonScript'\\|'SignonSession'\\|'SignonURL'\\|'socket'\\|'ssl'\\|'ssl_ca'\\|'ssl_ca_path'\\|'ssl_cert'\\|'ssl_ciphers'\\|'ssl_key'\\|'ssl_verify'\\|'table_coords'\\|'table_info'\\|'table_uiprefs'\\|'tracking'\\|'user'\\|'userconfig'\\|'usergroups'\\|'users'\\|'verbose', array\\<array\\<string\\>\\|bool\\|int\\<0, max\\>\\|string\\>\\|bool\\|int\\<1, max\\>\\|string\\|null\\> will always evaluate to true\\.$#"
count: 1
path: tests/classes/Config/DescriptionTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotNull\\(\\) with array\\<string\\>\\|bool\\|int\\<0, max\\>\\|string will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotNull\\(\\) with array\\<string\\>\\|bool\\|int\\<0, max\\>\\|string will always evaluate to true\\.$#"
count: 1
path: tests/classes/Config/DescriptionTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotNull\\(\\) with string will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotNull\\(\\) with string will always evaluate to true\\.$#"
count: 3
path: tests/classes/Config/DescriptionTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertTrue\\(\\) with null will always evaluate to false\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertTrue\\(\\) with null will always evaluate to false\\.$#"
count: 1
path: tests/classes/Config/FormDisplayTest.php
@ -15976,12 +15976,12 @@ parameters:
path: tests/classes/Config/FormDisplayTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Config\\\\\\\\Forms\\\\\\\\BaseFormList' and PhpMyAdmin\\\\Config\\\\Forms\\\\BaseFormList will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Config\\\\\\\\Forms\\\\\\\\BaseFormList' and PhpMyAdmin\\\\Config\\\\Forms\\\\BaseFormList will always evaluate to true\\.$#"
count: 1
path: tests/classes/Config/Forms/FormListTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotNull\\(\\) with string will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotNull\\(\\) with string will always evaluate to true\\.$#"
count: 1
path: tests/classes/Config/Forms/FormListTest.php
@ -16066,37 +16066,37 @@ parameters:
path: tests/classes/Config/Settings/SchemaTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Config\\\\\\\\Settings\\\\\\\\Console' and PhpMyAdmin\\\\Config\\\\Settings\\\\Console will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Config\\\\\\\\Settings\\\\\\\\Console' and PhpMyAdmin\\\\Config\\\\Settings\\\\Console will always evaluate to true\\.$#"
count: 1
path: tests/classes/Config/SettingsTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Config\\\\\\\\Settings\\\\\\\\Debug' and PhpMyAdmin\\\\Config\\\\Settings\\\\Debug will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Config\\\\\\\\Settings\\\\\\\\Debug' and PhpMyAdmin\\\\Config\\\\Settings\\\\Debug will always evaluate to true\\.$#"
count: 1
path: tests/classes/Config/SettingsTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Config\\\\\\\\Settings\\\\\\\\Export' and PhpMyAdmin\\\\Config\\\\Settings\\\\Export will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Config\\\\\\\\Settings\\\\\\\\Export' and PhpMyAdmin\\\\Config\\\\Settings\\\\Export will always evaluate to true\\.$#"
count: 1
path: tests/classes/Config/SettingsTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Config\\\\\\\\Settings\\\\\\\\Import' and PhpMyAdmin\\\\Config\\\\Settings\\\\Import will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Config\\\\\\\\Settings\\\\\\\\Import' and PhpMyAdmin\\\\Config\\\\Settings\\\\Import will always evaluate to true\\.$#"
count: 1
path: tests/classes/Config/SettingsTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Config\\\\\\\\Settings\\\\\\\\Schema' and PhpMyAdmin\\\\Config\\\\Settings\\\\Schema will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Config\\\\\\\\Settings\\\\\\\\Schema' and PhpMyAdmin\\\\Config\\\\Settings\\\\Schema will always evaluate to true\\.$#"
count: 1
path: tests/classes/Config/SettingsTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Config\\\\\\\\Settings\\\\\\\\SqlQueryBox' and PhpMyAdmin\\\\Config\\\\Settings\\\\SqlQueryBox will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Config\\\\\\\\Settings\\\\\\\\SqlQueryBox' and PhpMyAdmin\\\\Config\\\\Settings\\\\SqlQueryBox will always evaluate to true\\.$#"
count: 1
path: tests/classes/Config/SettingsTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Config\\\\\\\\Settings\\\\\\\\Transformations' and PhpMyAdmin\\\\Config\\\\Settings\\\\Transformations will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Config\\\\\\\\Settings\\\\\\\\Transformations' and PhpMyAdmin\\\\Config\\\\Settings\\\\Transformations will always evaluate to true\\.$#"
count: 1
path: tests/classes/Config/SettingsTest.php
@ -16111,17 +16111,17 @@ parameters:
path: tests/classes/Config/SettingsTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with arguments 'relation', array\\{version\\: string, user\\: string\\|null, db\\: string\\|null, bookmark\\: string\\|null, central_columns\\: string\\|null, column_info\\: string\\|null, designer_settings\\: string\\|null, export_templates\\: string\\|null, \\.\\.\\.\\} and 'The cache is…' will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with arguments 'relation', array\\{version\\: string, user\\: string\\|null, db\\: string\\|null, bookmark\\: string\\|null, central_columns\\: string\\|null, column_info\\: string\\|null, designer_settings\\: string\\|null, export_templates\\: string\\|null, \\.\\.\\.\\} and 'The cache is…' will always evaluate to true\\.$#"
count: 3
path: tests/classes/ConfigStorage/RelationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with '' and '' will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with '' and '' will always evaluate to true\\.$#"
count: 2
path: tests/classes/ConfigStorage/RelationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with 'db_pma' and 'db_pma' will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with 'db_pma' and 'db_pma' will always evaluate to true\\.$#"
count: 1
path: tests/classes/ConfigStorage/RelationTest.php
@ -16131,12 +16131,12 @@ parameters:
path: tests/classes/ConfigStorage/RelationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'Server' and array\\{PmaAbsoluteUri\\: string, AuthLog\\: string, AuthLogSuccess\\: bool, PmaNoRelation_DisableWarning\\: bool, SuhosinDisableWarning\\: bool, LoginCookieValidityDisableWarning\\: bool, ReservedWordDisableWarning\\: bool, TranslationWarningThreshold\\: int, \\.\\.\\.\\} will always evaluate to false\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'Server' and array\\{PmaAbsoluteUri\\: string, AuthLog\\: string, AuthLogSuccess\\: bool, PmaNoRelation_DisableWarning\\: bool, SuhosinDisableWarning\\: bool, LoginCookieValidityDisableWarning\\: bool, ReservedWordDisableWarning\\: bool, TranslationWarningThreshold\\: int, \\.\\.\\.\\} will always evaluate to false\\.$#"
count: 1
path: tests/classes/ConfigTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array\\<int\\<1, max\\>, array\\{host\\: string, port\\: string, socket\\: string, ssl\\: bool, ssl_key\\: string\\|null, ssl_cert\\: string\\|null, ssl_ca\\: string\\|null, ssl_ca_path\\: string\\|null, \\.\\.\\.\\}\\> will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array\\<int\\<1, max\\>, array\\{host\\: string, port\\: string, socket\\: string, ssl\\: bool, ssl_key\\: string\\|null, ssl_cert\\: string\\|null, ssl_ca\\: string\\|null, ssl_ca_path\\: string\\|null, \\.\\.\\.\\}\\> will always evaluate to true\\.$#"
count: 1
path: tests/classes/ConfigTest.php
@ -16206,22 +16206,22 @@ parameters:
path: tests/classes/Controllers/Database/StructureControllerTest.php
-
message: "#^Parameter \\#2 \\$array of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayNotHasKey\\(\\) expects array\\|ArrayAccess, mixed given\\.$#"
message: "#^Parameter \\#2 \\$array of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayNotHasKey\\(\\) expects array\\|ArrayAccess, mixed given\\.$#"
count: 1
path: tests/classes/Controllers/Database/StructureControllerTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 4
path: tests/classes/Controllers/Database/StructureControllerTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringNotContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringNotContainsString\\(\\) expects string, mixed given\\.$#"
count: 1
path: tests/classes/Controllers/Database/StructureControllerTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 4
path: tests/classes/Controllers/NavigationControllerTest.php
@ -16236,12 +16236,12 @@ parameters:
path: tests/classes/Controllers/Server/BinlogControllerTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 3
path: tests/classes/Controllers/Server/Databases/CreateControllerTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 2
path: tests/classes/Controllers/Server/Databases/DestroyControllerTest.php
@ -16346,7 +16346,7 @@ parameters:
path: tests/classes/CoreTest.php
-
message: "#^Parameter \\#2 \\$array of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayNotHasKey\\(\\) expects array\\|ArrayAccess, mixed given\\.$#"
message: "#^Parameter \\#2 \\$array of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayNotHasKey\\(\\) expects array\\|ArrayAccess, mixed given\\.$#"
count: 12
path: tests/classes/CoreTest.php
@ -16356,7 +16356,7 @@ parameters:
path: tests/classes/Crypto/CryptoTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array\\<string\\> will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array\\<string\\> will always evaluate to true\\.$#"
count: 1
path: tests/classes/Database/CentralColumnsTest.php
@ -16366,7 +16366,7 @@ parameters:
path: tests/classes/Database/CentralColumnsTest.php
-
message: "#^Parameter \\#1 \\$needle of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#1 \\$needle of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 1
path: tests/classes/Database/CentralColumnsTest.php
@ -16386,12 +16386,12 @@ parameters:
path: tests/classes/Database/DesignerTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Dbal\\\\\\\\ResultInterface' and PhpMyAdmin\\\\Dbal\\\\ResultInterface will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Dbal\\\\\\\\ResultInterface' and PhpMyAdmin\\\\Dbal\\\\ResultInterface will always evaluate to true\\.$#"
count: 1
path: tests/classes/DatabaseInterfaceTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\SystemDatabase' and PhpMyAdmin\\\\SystemDatabase will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\SystemDatabase' and PhpMyAdmin\\\\SystemDatabase will always evaluate to true\\.$#"
count: 1
path: tests/classes/DatabaseInterfaceTest.php
@ -16481,7 +16481,7 @@ parameters:
path: tests/classes/Display/ResultsTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 4
path: tests/classes/Display/ResultsTest.php
@ -16501,12 +16501,12 @@ parameters:
path: tests/classes/Export/OptionsTest.php
-
message: "#^Parameter \\#2 \\$array of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) expects array\\|ArrayAccess, mixed given\\.$#"
message: "#^Parameter \\#2 \\$array of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) expects array\\|ArrayAccess, mixed given\\.$#"
count: 1
path: tests/classes/FlashMessagesTest.php
-
message: "#^Parameter \\#2 \\$array of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayNotHasKey\\(\\) expects array\\|ArrayAccess, mixed given\\.$#"
message: "#^Parameter \\#2 \\$array of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayNotHasKey\\(\\) expects array\\|ArrayAccess, mixed given\\.$#"
count: 1
path: tests/classes/FlashMessagesTest.php
@ -16591,7 +16591,7 @@ parameters:
path: tests/classes/Html/GeneratorTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertTrue\\(\\) with true will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertTrue\\(\\) with true will always evaluate to true\\.$#"
count: 1
path: tests/classes/Import/AjaxTest.php
@ -16666,152 +16666,152 @@ parameters:
path: tests/classes/Navigation/Nodes/NodeTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'extra' and array\\{legendText\\: string, headText\\: string, queryError\\: bool, extra\\: PhpMyAdmin\\\\Message\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'extra' and array\\{legendText\\: string, headText\\: string, queryError\\: bool, extra\\: PhpMyAdmin\\\\Message\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'extra' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\|false\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'extra' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\|false\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'extra' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'extra' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'extra' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'extra' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string\\} will always evaluate to true\\.$#"
count: 2
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'extra' and array\\{legendText\\: string, headText\\: string, subText\\: string, hasPrimaryKey\\: string, extra\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'extra' and array\\{legendText\\: string, headText\\: string, subText\\: string, hasPrimaryKey\\: string, extra\\: string\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'hasPrimaryKey' and array\\{legendText\\: string, headText\\: string, subText\\: string, hasPrimaryKey\\: string, extra\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'hasPrimaryKey' and array\\{legendText\\: string, headText\\: string, subText\\: string, hasPrimaryKey\\: string, extra\\: string\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'headText' and array\\{legendText\\: string, headText\\: string, queryError\\: bool, extra\\: PhpMyAdmin\\\\Message\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'headText' and array\\{legendText\\: string, headText\\: string, queryError\\: bool, extra\\: PhpMyAdmin\\\\Message\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'headText' and array\\{legendText\\: string, headText\\: string, queryError\\: string\\|false, extra\\?\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'headText' and array\\{legendText\\: string, headText\\: string, queryError\\: string\\|false, extra\\?\\: string\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'headText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\|false\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'headText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\|false\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'headText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'headText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'headText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'headText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string\\} will always evaluate to true\\.$#"
count: 2
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'headText' and array\\{legendText\\: string, headText\\: string, subText\\: string, hasPrimaryKey\\: string, extra\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'headText' and array\\{legendText\\: string, headText\\: string, subText\\: string, hasPrimaryKey\\: string, extra\\: string\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'legendText' and array\\{legendText\\: string, headText\\: string, queryError\\: bool, extra\\: PhpMyAdmin\\\\Message\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'legendText' and array\\{legendText\\: string, headText\\: string, queryError\\: bool, extra\\: PhpMyAdmin\\\\Message\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'legendText' and array\\{legendText\\: string, headText\\: string, queryError\\: string\\|false, extra\\?\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'legendText' and array\\{legendText\\: string, headText\\: string, queryError\\: string\\|false, extra\\?\\: string\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'legendText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\|false\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'legendText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\|false\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'legendText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'legendText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'legendText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'legendText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string\\} will always evaluate to true\\.$#"
count: 2
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'legendText' and array\\{legendText\\: string, headText\\: string, subText\\: string, hasPrimaryKey\\: string, extra\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'legendText' and array\\{legendText\\: string, headText\\: string, subText\\: string, hasPrimaryKey\\: string, extra\\: string\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'message' and array\\{queryError\\: bool, message\\: PhpMyAdmin\\\\Message\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'message' and array\\{queryError\\: bool, message\\: PhpMyAdmin\\\\Message\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'primary_key' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\|false\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'primary_key' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\|false\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'primary_key' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'primary_key' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'queryError' and array\\{legendText\\: string, headText\\: string, queryError\\: bool, extra\\: PhpMyAdmin\\\\Message\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'queryError' and array\\{legendText\\: string, headText\\: string, queryError\\: bool, extra\\: PhpMyAdmin\\\\Message\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'queryError' and array\\{legendText\\: string, headText\\: string, queryError\\: string\\|false, extra\\?\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'queryError' and array\\{legendText\\: string, headText\\: string, queryError\\: string\\|false, extra\\?\\: string\\} will always evaluate to true\\.$#"
count: 2
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'queryError' and array\\{queryError\\: bool, message\\: PhpMyAdmin\\\\Message\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'queryError' and array\\{queryError\\: bool, message\\: PhpMyAdmin\\\\Message\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'subText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\|false\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'subText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\|false\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'subText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'subText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string, primary_key\\: string\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'subText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'subText' and array\\{legendText\\: string, headText\\: string, subText\\: string, extra\\: string\\} will always evaluate to true\\.$#"
count: 2
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'subText' and array\\{legendText\\: string, headText\\: string, subText\\: string, hasPrimaryKey\\: string, extra\\: string\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'subText' and array\\{legendText\\: string, headText\\: string, subText\\: string, hasPrimaryKey\\: string, extra\\: string\\} will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Message' and PhpMyAdmin\\\\Message will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Message' and PhpMyAdmin\\\\Message will always evaluate to true\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 1
path: tests/classes/NormalizationTest.php
@ -16821,12 +16821,12 @@ parameters:
path: tests/classes/NormalizationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotFalse\\(\\) with string will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotFalse\\(\\) with string will always evaluate to true\\.$#"
count: 1
path: tests/classes/OpenDocumentTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\StatementInfo' and PhpMyAdmin\\\\StatementInfo will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\StatementInfo' and PhpMyAdmin\\\\StatementInfo will always evaluate to true\\.$#"
count: 2
path: tests/classes/ParseAnalyzeTest.php
@ -16836,7 +16836,7 @@ parameters:
path: tests/classes/Partitioning/TablePartitionDefinitionTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 3
path: tests/classes/PdfTest.php
@ -16851,7 +16851,7 @@ parameters:
path: tests/classes/Plugins/Auth/AuthenticationConfigTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with 32 and 0 will always evaluate to false\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with 32 and 0 will always evaluate to false\\.$#"
count: 1
path: tests/classes/Plugins/Auth/AuthenticationCookieTest.php
@ -16901,7 +16901,7 @@ parameters:
path: tests/classes/Plugins/Auth/AuthenticationSignonTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 1
path: tests/classes/Plugins/Export/ExportHtmlwordTest.php
@ -16931,7 +16931,7 @@ parameters:
path: tests/classes/Plugins/Export/ExportOdtTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 11
path: tests/classes/Plugins/Export/ExportOdtTest.php
@ -16946,7 +16946,7 @@ parameters:
path: tests/classes/Plugins/Export/ExportSqlTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 10
path: tests/classes/Plugins/Export/ExportSqlTest.php
@ -16981,12 +16981,12 @@ parameters:
path: tests/classes/Plugins/Import/ImportCsvTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 6
path: tests/classes/Plugins/Import/ImportCsvTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertTrue\\(\\) with 'auto' will always evaluate to false\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertTrue\\(\\) with 'auto' will always evaluate to false\\.$#"
count: 1
path: tests/classes/Plugins/Import/ImportLdiTest.php
@ -17001,7 +17001,7 @@ parameters:
path: tests/classes/Plugins/Import/ImportLdiTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 6
path: tests/classes/Plugins/Import/ImportLdiTest.php
@ -17011,7 +17011,7 @@ parameters:
path: tests/classes/Plugins/Import/ImportMediawikiTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 5
path: tests/classes/Plugins/Import/ImportMediawikiTest.php
@ -17026,7 +17026,7 @@ parameters:
path: tests/classes/Plugins/Import/ImportOdsTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 13
path: tests/classes/Plugins/Import/ImportOdsTest.php
@ -17036,7 +17036,7 @@ parameters:
path: tests/classes/Plugins/Import/ImportShpTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 7
path: tests/classes/Plugins/Import/ImportShpTest.php
@ -17046,7 +17046,7 @@ parameters:
path: tests/classes/Plugins/Import/ImportSqlTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 3
path: tests/classes/Plugins/Import/ImportSqlTest.php
@ -17056,7 +17056,7 @@ parameters:
path: tests/classes/Plugins/Import/ImportXmlTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 5
path: tests/classes/Plugins/Import/ImportXmlTest.php
@ -17066,17 +17066,17 @@ parameters:
path: tests/classes/Plugins/Transformations/TransformationPluginsTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array\\<int, PhpMyAdmin\\\\Plugins\\\\ExportPlugin\\> will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array\\<int, PhpMyAdmin\\\\Plugins\\\\ExportPlugin\\> will always evaluate to true\\.$#"
count: 1
path: tests/classes/PluginsTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array\\<int, PhpMyAdmin\\\\Plugins\\\\ImportPlugin\\> will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array\\<int, PhpMyAdmin\\\\Plugins\\\\ImportPlugin\\> will always evaluate to true\\.$#"
count: 1
path: tests/classes/PluginsTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array\\<int, PhpMyAdmin\\\\Plugins\\\\SchemaPlugin\\> will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array\\<int, PhpMyAdmin\\\\Plugins\\\\SchemaPlugin\\> will always evaluate to true\\.$#"
count: 1
path: tests/classes/PluginsTest.php
@ -17086,7 +17086,7 @@ parameters:
path: tests/classes/PluginsTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Properties\\\\\\\\Options\\\\\\\\OptionsPropertyGroup' and PhpMyAdmin\\\\Properties\\\\Options\\\\OptionsPropertyGroup&PHPUnit\\\\Framework\\\\MockObject\\\\MockObject will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Properties\\\\\\\\Options\\\\\\\\OptionsPropertyGroup' and PhpMyAdmin\\\\Properties\\\\Options\\\\OptionsPropertyGroup&PHPUnit\\\\Framework\\\\MockObject\\\\MockObject will always evaluate to true\\.$#"
count: 1
path: tests/classes/Properties/Options/OptionsPropertyGroupTest.php
@ -17096,7 +17096,7 @@ parameters:
path: tests/classes/Replication/ReplicationGuiTest.php
-
message: "#^Parameter \\#1 \\$directory of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertDirectoryIsWritable\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#1 \\$directory of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertDirectoryIsWritable\\(\\) expects string, mixed given\\.$#"
count: 1
path: tests/classes/Routing/RoutingTest.php
@ -17106,22 +17106,22 @@ parameters:
path: tests/classes/Routing/RoutingTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Server\\\\\\\\Plugin' and PhpMyAdmin\\\\Server\\\\Plugin will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Server\\\\\\\\Plugin' and PhpMyAdmin\\\\Server\\\\Plugin will always evaluate to true\\.$#"
count: 1
path: tests/classes/Server/PluginTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Server\\\\\\\\Plugin' and PhpMyAdmin\\\\Server\\\\Plugin will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Server\\\\\\\\Plugin' and PhpMyAdmin\\\\Server\\\\Plugin will always evaluate to true\\.$#"
count: 2
path: tests/classes/Server/PluginsTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array\\<PhpMyAdmin\\\\Server\\\\Plugin\\> will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array\\<PhpMyAdmin\\\\Server\\\\Plugin\\> will always evaluate to true\\.$#"
count: 2
path: tests/classes/Server/PluginsTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array\\<int\\|string, string\\> will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array\\<int\\|string, string\\> will always evaluate to true\\.$#"
count: 1
path: tests/classes/Server/PluginsTest.php
@ -17131,12 +17131,12 @@ parameters:
path: tests/classes/Server/PluginsTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 0 and array\\{string, PhpMyAdmin\\\\Message\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 0 and array\\{string, PhpMyAdmin\\\\Message\\} will always evaluate to true\\.$#"
count: 3
path: tests/classes/Server/PrivilegesTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 1 and array\\{string, PhpMyAdmin\\\\Message\\} will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 1 and array\\{string, PhpMyAdmin\\\\Message\\} will always evaluate to true\\.$#"
count: 3
path: tests/classes/Server/PrivilegesTest.php
@ -17176,7 +17176,7 @@ parameters:
path: tests/classes/Server/SelectTest.php
-
message: "#^Parameter \\#1 \\$needle of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#1 \\$needle of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 4
path: tests/classes/Server/SelectTest.php
@ -17186,7 +17186,7 @@ parameters:
path: tests/classes/Server/SelectTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Server\\\\\\\\SysInfo\\\\\\\\Base' and PhpMyAdmin\\\\Server\\\\SysInfo\\\\Base will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Server\\\\\\\\SysInfo\\\\\\\\Base' and PhpMyAdmin\\\\Server\\\\SysInfo\\\\Base will always evaluate to true\\.$#"
count: 1
path: tests/classes/Server/SysInfo/SysInfoTest.php
@ -17261,7 +17261,7 @@ parameters:
path: tests/classes/Stubs/ResponseRenderer.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Table\\\\\\\\Table' and PhpMyAdmin\\\\Table\\\\Table will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Table\\\\\\\\Table' and PhpMyAdmin\\\\Table\\\\Table will always evaluate to true\\.$#"
count: 1
path: tests/classes/Table/TableTest.php
@ -17271,27 +17271,27 @@ parameters:
path: tests/classes/Table/TableTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 3
path: tests/classes/Table/TableTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringNotContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringNotContainsString\\(\\) expects string, mixed given\\.$#"
count: 1
path: tests/classes/Table/TableTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array will always evaluate to true\\.$#"
count: 1
path: tests/classes/Theme/ThemeManagerTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertTrue\\(\\) with true will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertTrue\\(\\) with true will always evaluate to true\\.$#"
count: 1
path: tests/classes/Theme/ThemeManagerTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Theme\\\\\\\\Theme' and PhpMyAdmin\\\\Theme\\\\Theme will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Theme\\\\\\\\Theme' and PhpMyAdmin\\\\Theme\\\\Theme will always evaluate to true\\.$#"
count: 1
path: tests/classes/Theme/ThemeTest.php
@ -17311,7 +17311,7 @@ parameters:
path: tests/classes/Tracking/TrackingTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 5
path: tests/classes/Tracking/TrackingTest.php
@ -17381,7 +17381,7 @@ parameters:
path: tests/classes/UserPreferencesTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertCount\\(\\) expects Countable\\|iterable, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertCount\\(\\) expects Countable\\|iterable, mixed given\\.$#"
count: 1
path: tests/classes/UserPreferencesTest.php
@ -17421,7 +17421,7 @@ parameters:
path: tests/classes/UtilTest.php
-
message: "#^Parameter \\#2 \\$array of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayNotHasKey\\(\\) expects array\\|ArrayAccess, mixed given\\.$#"
message: "#^Parameter \\#2 \\$array of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayNotHasKey\\(\\) expects array\\|ArrayAccess, mixed given\\.$#"
count: 2
path: tests/classes/UtilTest.php
@ -17441,12 +17441,12 @@ parameters:
path: tests/classes/Utils/HttpRequestTest.php
-
message: "#^Parameter \\#1 \\$needle of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#1 \\$needle of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 1
path: tests/classes/Utils/HttpRequestTest.php
-
message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
message: "#^Parameter \\#2 \\$haystack of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringContainsString\\(\\) expects string, mixed given\\.$#"
count: 1
path: tests/classes/Utils/HttpRequestTest.php
@ -17466,7 +17466,7 @@ parameters:
path: tests/classes/Utils/SessionCacheTest.php
-
message: "#^Parameter \\#2 \\$array of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayNotHasKey\\(\\) expects array\\|ArrayAccess, mixed given\\.$#"
message: "#^Parameter \\#2 \\$array of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayNotHasKey\\(\\) expects array\\|ArrayAccess, mixed given\\.$#"
count: 2
path: tests/classes/Utils/SessionCacheTest.php
@ -17486,27 +17486,27 @@ parameters:
path: tests/classes/VersionInformationTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsBool\\(\\) with true will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsBool\\(\\) with true will always evaluate to true\\.$#"
count: 1
path: tests/classes/VersionTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsInt\\(\\) with 0 will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsInt\\(\\) with 0 will always evaluate to true\\.$#"
count: 2
path: tests/classes/VersionTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsInt\\(\\) with 6 will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsInt\\(\\) with 6 will always evaluate to true\\.$#"
count: 1
path: tests/classes/VersionTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsString\\(\\) with 'dev' will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsString\\(\\) with 'dev' will always evaluate to true\\.$#"
count: 1
path: tests/classes/VersionTest.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsString\\(\\) with non\\-falsy\\-string will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsString\\(\\) with non\\-falsy\\-string will always evaluate to true\\.$#"
count: 1
path: tests/classes/VersionTest.php
@ -17561,7 +17561,7 @@ parameters:
path: tests/config.e2e.inc.php
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotNull\\(\\) with Facebook\\\\WebDriver\\\\Remote\\\\RemoteWebElement will always evaluate to true\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotNull\\(\\) with Facebook\\\\WebDriver\\\\Remote\\\\RemoteWebElement will always evaluate to true\\.$#"
count: 1
path: tests/selenium/Database/OperationsTest.php

View File

@ -26,12 +26,3 @@ parameters:
checkDynamicProperties: true
checkTooWideReturnTypesInProtectedAndPublicMethods: true
checkImplicitMixed: true
ignoreErrors:
-
message: '#Dynamic call to static method PHPUnit\\Framework\\Assert::[a-zA-Z]+\(\)\.#'
paths:
- tests/classes/*
- tests/selenium/*
-
message: '#Dynamic call to static method PHPUnit\\Framework\\TestCase::[a-zA-Z]+\(\)\.#'
path: tests/classes/*

View File

@ -35,7 +35,7 @@ class AdvisorTest extends AbstractTestCase
public function testAdvisorBytime(float $time, string $expected): void
{
$result = Advisor::byTime($time, 2);
$this->assertEquals($expected, $result);
self::assertEquals($expected, $result);
}
/** @return mixed[][] */
@ -69,14 +69,14 @@ class AdvisorTest extends AbstractTestCase
$advisor->addRule('fired', $rule);
$runResult = $advisor->getRunResult();
if ($error !== null) {
$this->assertEquals([$error], $runResult['errors']);
self::assertEquals([$error], $runResult['errors']);
}
if ($runResult['fired'] === [] && $expected === []) {
return;
}
$this->assertEquals([$expected], $runResult['fired']);
self::assertEquals([$expected], $runResult['fired']);
}
/**

View File

@ -18,16 +18,16 @@ class RulesTest extends TestCase
public function testRules(callable $rulesFactory): void
{
$rules = $rulesFactory();
$this->assertNotEmpty($rules);
self::assertNotEmpty($rules);
foreach ($rules as $rule) {
$this->assertArrayHasKey('id', $rule);
$this->assertArrayHasKey('name', $rule);
$this->assertArrayHasKey('formula', $rule);
$this->assertArrayHasKey('test', $rule);
$this->assertArrayHasKey('issue', $rule);
$this->assertArrayHasKey('recommendation', $rule);
$this->assertArrayHasKey('justification', $rule);
$this->assertContainsOnly('string', $rule);
self::assertArrayHasKey('id', $rule);
self::assertArrayHasKey('name', $rule);
self::assertArrayHasKey('formula', $rule);
self::assertArrayHasKey('test', $rule);
self::assertArrayHasKey('issue', $rule);
self::assertArrayHasKey('recommendation', $rule);
self::assertArrayHasKey('justification', $rule);
self::assertContainsOnly('string', $rule);
}
}

View File

@ -27,10 +27,10 @@ final class ApplicationTest extends AbstractTestCase
#[BackupStaticProperties(true)]
public function testRunWithConfigError(): void
{
$errorHandler = $this->createStub(ErrorHandler::class);
$errorHandler = self::createStub(ErrorHandler::class);
$config = $this->createMock(Config::class);
$config->expects($this->once())->method('loadAndCheck')
$config = self::createMock(Config::class);
$config->expects(self::once())->method('loadAndCheck')
->willThrowException(new ConfigException('Failed to load phpMyAdmin configuration.'));
$config->config = new Config\Settings([]);
@ -45,6 +45,6 @@ final class ApplicationTest extends AbstractTestCase
$application->run();
$output = $this->getActualOutputForAssertion();
$this->assertSame($expected, $output);
self::assertSame($expected, $output);
}
}

View File

@ -63,7 +63,7 @@ class BookmarkTest extends AbstractTestCase
Config::getInstance()->selectedServer['user'],
'sakila',
);
$this->assertContainsOnlyInstancesOf(Bookmark::class, $actual);
self::assertContainsOnlyInstancesOf(Bookmark::class, $actual);
$this->dummyDbi->assertAllSelectsConsumed();
}
@ -78,7 +78,7 @@ class BookmarkTest extends AbstractTestCase
['id', 'dbase', 'user', 'label', 'query'],
);
$dbi = DatabaseInterface::getInstance();
$this->assertNull(
self::assertNull(
(new BookmarkRepository($dbi, new Relation($dbi)))->get(
Config::getInstance()->selectedServer['user'],
1,
@ -103,7 +103,7 @@ class BookmarkTest extends AbstractTestCase
'root',
'phpmyadmin',
);
$this->assertNotFalse($bookmark);
$this->assertTrue($bookmark->save());
self::assertNotFalse($bookmark);
self::assertTrue($bookmark->save());
}
}

View File

@ -30,18 +30,18 @@ class BrowseForeignersTest extends AbstractTestCase
*/
public function testGetForeignLimit(): void
{
$this->assertNull(
self::assertNull(
$this->browseForeigners->getForeignLimit('Show all'),
);
$this->assertEquals(
self::assertEquals(
'LIMIT 0, 25 ',
$this->browseForeigners->getForeignLimit(null),
);
$_POST['pos'] = 10;
$this->assertEquals(
self::assertEquals(
'LIMIT 10, 25 ',
$this->browseForeigners->getForeignLimit(null),
);
@ -50,12 +50,12 @@ class BrowseForeignersTest extends AbstractTestCase
$config->set('MaxRows', 50);
$browseForeigners = new BrowseForeigners(new Template(), $config, new ThemeManager());
$this->assertEquals(
self::assertEquals(
'LIMIT 10, 50 ',
$browseForeigners->getForeignLimit(null),
);
$this->assertEquals(
self::assertEquals(
'LIMIT 10, 50 ',
$browseForeigners->getForeignLimit('xyz'),
);
@ -66,7 +66,7 @@ class BrowseForeignersTest extends AbstractTestCase
*/
public function testGetHtmlForGotoPage(): void
{
$this->assertEquals(
self::assertEquals(
'',
$this->callFunction(
$this->browseForeigners,
@ -81,7 +81,7 @@ class BrowseForeignersTest extends AbstractTestCase
$foreignData['disp_row'] = [];
$foreignData['the_total'] = 5;
$this->assertEquals(
self::assertEquals(
'',
$this->callFunction(
$this->browseForeigners,
@ -99,15 +99,15 @@ class BrowseForeignersTest extends AbstractTestCase
[$foreignData],
);
$this->assertStringStartsWith('Page number:', $result);
self::assertStringStartsWith('Page number:', $result);
$this->assertStringEndsWith('</select>', $result);
self::assertStringEndsWith('</select>', $result);
$this->assertStringContainsString('<select class="pageselector ajax" name="pos"', $result);
self::assertStringContainsString('<select class="pageselector ajax" name="pos"', $result);
$this->assertStringContainsString('<option selected="selected" style="font-weight: bold" value="0">', $result);
self::assertStringContainsString('<option selected="selected" style="font-weight: bold" value="0">', $result);
$this->assertStringContainsString('<option value="25"', $result);
self::assertStringContainsString('<option value="25"', $result);
}
/**
@ -117,7 +117,7 @@ class BrowseForeignersTest extends AbstractTestCase
{
$desc = 'foobar<baz';
$this->assertEquals(
self::assertEquals(
['foobar<baz', ''],
$this->callFunction(
$this->browseForeigners,
@ -131,7 +131,7 @@ class BrowseForeignersTest extends AbstractTestCase
$config->set('LimitChars', 5);
$browseForeigners = new BrowseForeigners(new Template(), $config, new ThemeManager());
$this->assertEquals(
self::assertEquals(
['fooba...', 'foobar<baz'],
$this->callFunction(
$browseForeigners,
@ -165,36 +165,36 @@ class BrowseForeignersTest extends AbstractTestCase
$currentValue,
);
$this->assertStringContainsString(
self::assertStringContainsString(
'<form class="ajax" '
. 'id="browse_foreign_form" name="browse_foreign_from" '
. 'action="index.php?route=/browse-foreigners',
$result,
);
$this->assertStringContainsString('" method="post">', $result);
self::assertStringContainsString('" method="post">', $result);
$this->assertStringContainsString('<fieldset class="row g-3 align-items-center mb-3">', $result);
self::assertStringContainsString('<fieldset class="row g-3 align-items-center mb-3">', $result);
$this->assertStringContainsString('<input type="hidden" name="field" value="foo">', $result);
self::assertStringContainsString('<input type="hidden" name="field" value="foo">', $result);
$this->assertStringContainsString('<input type="hidden" name="fieldkey" value="bar">', $result);
self::assertStringContainsString('<input type="hidden" name="fieldkey" value="bar">', $result);
$this->assertStringContainsString('<input type="hidden" name="rownumber" value="1">', $result);
self::assertStringContainsString('<input type="hidden" name="rownumber" value="1">', $result);
$this->assertStringContainsString('<div class="col-auto">', $result);
$this->assertStringContainsString('<label class="form-label" for="input_foreign_filter">', $result);
$this->assertStringContainsString(
self::assertStringContainsString('<div class="col-auto">', $result);
self::assertStringContainsString('<label class="form-label" for="input_foreign_filter">', $result);
self::assertStringContainsString(
'<input class="form-control" type="text" name="foreign_filter" '
. 'id="input_foreign_filter" value="5" data-old="5">',
$result,
);
$this->assertStringContainsString(
self::assertStringContainsString(
'<input class="btn btn-primary" type="submit" name="submit_foreign_filter" value="Go">',
$result,
);
$this->assertStringContainsString(
self::assertStringContainsString(
'<table class="table table-striped table-hover" id="browse_foreign_table">',
$result,
);
@ -210,11 +210,11 @@ class BrowseForeignersTest extends AbstractTestCase
$currentValue,
);
$this->assertStringContainsString(
self::assertStringContainsString(
'<table class="table table-striped table-hover" id="browse_foreign_table">',
$result,
);
$this->assertStringContainsString('<th>', $result);
self::assertStringContainsString('<th>', $result);
}
}

View File

@ -30,62 +30,62 @@ class CacheTest extends AbstractTestCase
#[DataProvider('dataProviderCacheKeyValues')]
public function testCacheHas(string $cacheKey, mixed $valueToCache): void
{
$this->assertFalse(Cache::has($cacheKey));
self::assertFalse(Cache::has($cacheKey));
Cache::set($cacheKey, $valueToCache);
$this->assertTrue(Cache::has($cacheKey));
self::assertTrue(Cache::has($cacheKey));
Cache::remove($cacheKey);
$this->assertFalse(Cache::has($cacheKey));
self::assertFalse(Cache::has($cacheKey));
}
#[DataProvider('dataProviderCacheKeyValues')]
public function testCachePurge(string $cacheKey, mixed $valueToCache): void
{
$this->assertFalse(Cache::has($cacheKey));
self::assertFalse(Cache::has($cacheKey));
Cache::set($cacheKey, $valueToCache);
$this->assertTrue(Cache::has($cacheKey));
self::assertTrue(Cache::has($cacheKey));
Cache::purge();
$this->assertFalse(Cache::has($cacheKey));
self::assertFalse(Cache::has($cacheKey));
}
#[DataProvider('dataProviderCacheKeyValues')]
public function testCacheSet(string $cacheKey, mixed $valueToCache): void
{
$this->assertFalse(Cache::has($cacheKey));
self::assertFalse(Cache::has($cacheKey));
Cache::set($cacheKey, $valueToCache);
$this->assertTrue(Cache::has($cacheKey));
self::assertTrue(Cache::has($cacheKey));
}
#[DataProvider('dataProviderCacheKeyValues')]
public function testCacheGet(string $cacheKey, mixed $valueToCache): void
{
$this->assertFalse(Cache::has($cacheKey));
self::assertFalse(Cache::has($cacheKey));
Cache::set($cacheKey, $valueToCache);
$this->assertTrue(Cache::has($cacheKey));
$this->assertSame(Cache::get($cacheKey), $valueToCache);
self::assertTrue(Cache::has($cacheKey));
self::assertSame(Cache::get($cacheKey), $valueToCache);
}
#[DataProvider('dataProviderCacheKeyValues')]
public function testCacheGetDefaultValue(string $cacheKey, mixed $valueToCache): void
{
$this->assertFalse(Cache::has($cacheKey));
self::assertFalse(Cache::has($cacheKey));
Cache::set($cacheKey, $valueToCache);
$this->assertTrue(Cache::has($cacheKey));
$this->assertSame(Cache::get($cacheKey, null), $valueToCache);
self::assertTrue(Cache::has($cacheKey));
self::assertSame(Cache::get($cacheKey, null), $valueToCache);
Cache::remove($cacheKey);
$this->assertFalse(Cache::has($cacheKey));
$this->assertNull(Cache::get($cacheKey, null));
self::assertFalse(Cache::has($cacheKey));
self::assertNull(Cache::get($cacheKey, null));
$defaultValue = new stdClass();
$this->assertSame($defaultValue, Cache::get($cacheKey, $defaultValue));
$this->assertFalse(Cache::get($cacheKey, false));
self::assertSame($defaultValue, Cache::get($cacheKey, $defaultValue));
self::assertFalse(Cache::get($cacheKey, false));
}
#[DataProvider('dataProviderCacheKeyValues')]
public function testCacheRemove(string $cacheKey, mixed $valueToCache): void
{
$this->assertFalse(Cache::has($cacheKey));
self::assertFalse(Cache::has($cacheKey));
Cache::set($cacheKey, $valueToCache);
$this->assertTrue(Cache::has($cacheKey));
self::assertTrue(Cache::has($cacheKey));
Cache::remove($cacheKey);
$this->assertFalse(Cache::has($cacheKey));
self::assertFalse(Cache::has($cacheKey));
}
}

View File

@ -22,10 +22,10 @@ class CharsetTest extends AbstractTestCase
$charset = Charset::fromServer($serverCharset);
$this->assertInstanceOf(Charset::class, $charset);
$this->assertSame('utf8', $charset->getName());
$this->assertSame('utf8_general_ci', $charset->getDefaultCollation());
$this->assertSame('UTF-8 Unicode', $charset->getDescription());
$this->assertSame(3, $charset->getMaxLength());
self::assertInstanceOf(Charset::class, $charset);
self::assertSame('utf8', $charset->getName());
self::assertSame('utf8_general_ci', $charset->getDefaultCollation());
self::assertSame('UTF-8 Unicode', $charset->getDescription());
self::assertSame(3, $charset->getMaxLength());
}
}

View File

@ -26,15 +26,15 @@ class CollationTest extends AbstractTestCase
$collation = Collation::fromServer($serverCollation);
$this->assertInstanceOf(Collation::class, $collation);
$this->assertSame('utf8_general_ci', $collation->getName());
$this->assertSame('Unicode, case-insensitive', $collation->getDescription());
$this->assertSame('utf8', $collation->getCharset());
$this->assertSame(33, $collation->getId());
$this->assertTrue($collation->isDefault());
$this->assertTrue($collation->isCompiled());
$this->assertSame(1, $collation->getSortLength());
$this->assertSame('PAD SPACE', $collation->getPadAttribute());
self::assertInstanceOf(Collation::class, $collation);
self::assertSame('utf8_general_ci', $collation->getName());
self::assertSame('Unicode, case-insensitive', $collation->getDescription());
self::assertSame('utf8', $collation->getCharset());
self::assertSame(33, $collation->getId());
self::assertTrue($collation->isDefault());
self::assertTrue($collation->isCompiled());
self::assertSame(1, $collation->getSortLength());
self::assertSame('PAD SPACE', $collation->getPadAttribute());
}
/**
@ -47,7 +47,7 @@ class CollationTest extends AbstractTestCase
public function testBuildDescription(string $collation, string $description): void
{
$actual = Collation::fromServer(['Collation' => $collation]);
$this->assertEquals($description, $actual->getDescription());
self::assertEquals($description, $actual->getDescription());
}
/** @return array<array{string, string}> */

View File

@ -34,19 +34,19 @@ class CharsetsTest extends AbstractTestCase
);
$charset = Charsets::getServerCharset($dbi, false);
$this->assertSame('utf8', $charset->getName());
self::assertSame('utf8', $charset->getName());
$charset = Charsets::getServerCharset($dbi, false);
$this->assertSame('Unknown', $charset->getName());
self::assertSame('Unknown', $charset->getName());
$charset = Charsets::getServerCharset($dbi, false);
$this->assertSame('utf8', $charset->getName());
self::assertSame('utf8', $charset->getName());
$charset = Charsets::getServerCharset($dbi, false);
$this->assertSame('utf8mb4', $charset->getName());
self::assertSame('utf8mb4', $charset->getName());
$charset = Charsets::getServerCharset($dbi, false);
$this->assertSame('utf8mb4', $charset->getName());
self::assertSame('utf8mb4', $charset->getName());
$dummyDbi->assertAllQueriesConsumed();
}
@ -54,19 +54,19 @@ class CharsetsTest extends AbstractTestCase
public function testFindCollationByName(): void
{
$dbi = $this->createDatabaseInterface();
$this->assertNull(Charsets::findCollationByName($dbi, false, ''));
$this->assertNull(Charsets::findCollationByName($dbi, false, 'invalid'));
self::assertNull(Charsets::findCollationByName($dbi, false, ''));
self::assertNull(Charsets::findCollationByName($dbi, false, 'invalid'));
$actual = Charsets::findCollationByName($dbi, false, 'utf8_general_ci');
$this->assertInstanceOf(Charsets\Collation::class, $actual);
$this->assertSame('utf8_general_ci', $actual->getName());
self::assertInstanceOf(Charsets\Collation::class, $actual);
self::assertSame('utf8_general_ci', $actual->getName());
}
public function testGetCharsetsWithIS(): void
{
$dbi = $this->createDatabaseInterface();
$charsets = Charsets::getCharsets($dbi, false);
$this->assertCount(4, $charsets);
$this->assertContainsOnlyInstancesOf(Charsets\Charset::class, $charsets);
self::assertCount(4, $charsets);
self::assertContainsOnlyInstancesOf(Charsets\Charset::class, $charsets);
}
public function testGetCharsetsWithoutIS(): void
@ -85,18 +85,18 @@ class CharsetsTest extends AbstractTestCase
);
$charsets = Charsets::getCharsets($dbi, true);
$this->assertCount(4, $charsets);
$this->assertContainsOnlyInstancesOf(Charsets\Charset::class, $charsets);
self::assertCount(4, $charsets);
self::assertContainsOnlyInstancesOf(Charsets\Charset::class, $charsets);
}
public function testGetCollationsWithIS(): void
{
$dbi = $this->createDatabaseInterface();
$collations = Charsets::getCollations($dbi, false);
$this->assertCount(4, $collations);
$this->assertContainsOnly('array', $collations);
self::assertCount(4, $collations);
self::assertContainsOnly('array', $collations);
foreach ($collations as $collation) {
$this->assertContainsOnlyInstancesOf(Charsets\Collation::class, $collation);
self::assertContainsOnlyInstancesOf(Charsets\Collation::class, $collation);
}
}
@ -105,10 +105,10 @@ class CharsetsTest extends AbstractTestCase
$dbi = $this->createDatabaseInterface();
$dbi->setVersion(['@@version' => '10.10.0-MariaDB']);
$collations = Charsets::getCollations($dbi, false);
$this->assertCount(4, $collations);
$this->assertContainsOnly('array', $collations);
self::assertCount(4, $collations);
self::assertContainsOnly('array', $collations);
foreach ($collations as $collation) {
$this->assertContainsOnlyInstancesOf(Charsets\Collation::class, $collation);
self::assertContainsOnlyInstancesOf(Charsets\Collation::class, $collation);
}
}
@ -129,10 +129,10 @@ class CharsetsTest extends AbstractTestCase
);
$collations = Charsets::getCollations($dbi, true);
$this->assertCount(4, $collations);
$this->assertContainsOnly('array', $collations);
self::assertCount(4, $collations);
self::assertContainsOnly('array', $collations);
foreach ($collations as $collation) {
$this->assertContainsOnlyInstancesOf(Charsets\Collation::class, $collation);
self::assertContainsOnlyInstancesOf(Charsets\Collation::class, $collation);
}
}
}

View File

@ -45,10 +45,10 @@ class CheckUserPrivilegesTest extends AbstractTestCase
// call the to-be-tested function
$this->checkUserPrivileges->checkRequiredPrivilegesForAdjust($showGrants);
$this->assertTrue(UserPrivileges::$column);
$this->assertTrue(UserPrivileges::$database);
$this->assertTrue(UserPrivileges::$routines);
$this->assertTrue(UserPrivileges::$table);
self::assertTrue(UserPrivileges::$column);
self::assertTrue(UserPrivileges::$database);
self::assertTrue(UserPrivileges::$routines);
self::assertTrue(UserPrivileges::$table);
// re-initialise the privileges
$this->setUp();
@ -59,10 +59,10 @@ class CheckUserPrivilegesTest extends AbstractTestCase
// call the to-be-tested function
$this->checkUserPrivileges->checkRequiredPrivilegesForAdjust($showGrants);
$this->assertTrue(UserPrivileges::$column);
$this->assertTrue(UserPrivileges::$database);
$this->assertTrue(UserPrivileges::$routines);
$this->assertTrue(UserPrivileges::$table);
self::assertTrue(UserPrivileges::$column);
self::assertTrue(UserPrivileges::$database);
self::assertTrue(UserPrivileges::$routines);
self::assertTrue(UserPrivileges::$table);
// re-initialise the privileges
$this->setUp();
@ -73,10 +73,10 @@ class CheckUserPrivilegesTest extends AbstractTestCase
// call the to-be-tested function
$this->checkUserPrivileges->checkRequiredPrivilegesForAdjust($showGrants);
$this->assertTrue(UserPrivileges::$column);
$this->assertTrue(UserPrivileges::$database);
$this->assertTrue(UserPrivileges::$routines);
$this->assertTrue(UserPrivileges::$table);
self::assertTrue(UserPrivileges::$column);
self::assertTrue(UserPrivileges::$database);
self::assertTrue(UserPrivileges::$routines);
self::assertTrue(UserPrivileges::$table);
// re-initialise the privileges
$this->setUp();
@ -87,9 +87,9 @@ class CheckUserPrivilegesTest extends AbstractTestCase
// call the to-be-tested function
$this->checkUserPrivileges->checkRequiredPrivilegesForAdjust($showGrants);
$this->assertFalse(UserPrivileges::$column);
$this->assertTrue(UserPrivileges::$database);
$this->assertFalse(UserPrivileges::$routines);
$this->assertFalse(UserPrivileges::$table);
self::assertFalse(UserPrivileges::$column);
self::assertTrue(UserPrivileges::$database);
self::assertFalse(UserPrivileges::$routines);
self::assertFalse(UserPrivileges::$table);
}
}

View File

@ -55,7 +55,7 @@ class SetVersionCommandTest extends AbstractTestCase
public function testGetGeneratedClassInvalidVersion(string $version): void
{
if (! class_exists(Command::class)) {
$this->markTestSkipped('The Symfony Console is missing');
self::markTestSkipped('The Symfony Console is missing');
}
$this->expectException(RangeException::class);
@ -167,7 +167,7 @@ class SetVersionCommandTest extends AbstractTestCase
public function testGetGeneratedClassValidVersion(string $version, string $content): void
{
if (! class_exists(Command::class)) {
$this->markTestSkipped('The Symfony Console is missing');
self::markTestSkipped('The Symfony Console is missing');
}
$output = $this->callFunction(
@ -197,7 +197,7 @@ final class Version
}
PHP;
$this->assertSame(
self::assertSame(
sprintf($template, $content),
$output,
);

View File

@ -28,7 +28,7 @@ class TwigLintCommandTest extends AbstractTestCase
public function setUp(): void
{
if (! class_exists(Command::class)) {
$this->markTestSkipped('The Symfony Console is missing');
self::markTestSkipped('The Symfony Console is missing');
}
parent::setUp();
@ -44,7 +44,7 @@ class TwigLintCommandTest extends AbstractTestCase
TEST_PATH . 'tests/classes/_data/file_listing/subfolder/one.ini',
]);
$this->assertSame('key=value' . "\n", $contents);
self::assertSame('key=value' . "\n", $contents);
}
public function testFindFiles(): void
@ -55,7 +55,7 @@ class TwigLintCommandTest extends AbstractTestCase
// Sort results to avoid file system test specific failures
sort($filesFound, SORT_NATURAL);
$this->assertEquals([
self::assertEquals([
$path . DIRECTORY_SEPARATOR . 'one.txt',
$path . DIRECTORY_SEPARATOR . 'subfolder' . DIRECTORY_SEPARATOR . 'one.ini',
$path . DIRECTORY_SEPARATOR . 'subfolder' . DIRECTORY_SEPARATOR . 'zero.txt',
@ -71,7 +71,7 @@ class TwigLintCommandTest extends AbstractTestCase
// Sort results to avoid file system test specific failures
sort($filesInfos, SORT_REGULAR);
$this->assertEquals([
self::assertEquals([
['template' => '', 'file' => $path . DIRECTORY_SEPARATOR . 'one.txt', 'valid' => true],
['template' => '', 'file' => $path . DIRECTORY_SEPARATOR . 'two.md', 'valid' => true],
[
@ -93,13 +93,13 @@ class TwigLintCommandTest extends AbstractTestCase
->onlyMethods(['getTemplateContents', 'findFiles'])
->getMock();
$command->expects($this->exactly(1))
$command->expects(self::exactly(1))
->method('findFiles')
->willReturn(
['foo.twig', 'foo-invalid.twig'],
);
$command->expects($this->exactly(2))->method('getTemplateContents')->willReturnMap([
$command->expects(self::exactly(2))->method('getTemplateContents')->willReturnMap([
['foo.twig', '{{ file }}'],
['foo-invalid.twig', '{{ file }'],
]);
@ -108,7 +108,7 @@ class TwigLintCommandTest extends AbstractTestCase
TEST_PATH . 'tests/classes/_data/file_listing',
]);
$this->assertEquals([
self::assertEquals([
['template' => '{{ file }}', 'file' => 'foo.twig', 'valid' => true],
[
'template' => '{{ file }',
@ -127,14 +127,14 @@ class TwigLintCommandTest extends AbstractTestCase
{
$context = $this->callFunction($this->command, TwigLintCommand::class, 'getContext', ['{{ file }', 0]);
$this->assertEquals([1 => '{{ file }'], $context);
self::assertEquals([1 => '{{ file }'], $context);
$context = $this->callFunction($this->command, TwigLintCommand::class, 'getContext', ['{{ file }', 3]);
$this->assertEquals([1 => '{{ file }'], $context);
self::assertEquals([1 => '{{ file }'], $context);
$context = $this->callFunction($this->command, TwigLintCommand::class, 'getContext', ['{{ file }', 5]);
$this->assertEquals([], $context);
self::assertEquals([], $context);
}
}

View File

@ -20,14 +20,14 @@ class WriteGitRevisionCommandTest extends AbstractTestCase
public function testGetGeneratedClassValidVersion(): void
{
if (! class_exists(Command::class)) {
$this->markTestSkipped('The Symfony Console is missing');
self::markTestSkipped('The Symfony Console is missing');
}
$this->command = $this->getMockBuilder(WriteGitRevisionCommand::class)
->onlyMethods(['gitCli'])
->getMock();
$this->command->expects($this->exactly(3))->method('gitCli')->willReturnMap([
$this->command->expects(self::exactly(3))->method('gitCli')->willReturnMap([
['describe --always', 'RELEASE_5_1_0-638-g1c018e2a6c'],
['log -1 --format="%H"', '1c018e2a6c6d518c4a2dde059e49f33af67c4636'],
['symbolic-ref -q HEAD', 'refs/heads/cli-rev-info'],
@ -57,7 +57,7 @@ return [
];
PHP;
$this->assertSame(
self::assertSame(
sprintf(
$template,
'RELEASE_5_1_0-638-g1c018e2a6c',

View File

@ -54,20 +54,20 @@ class ConfigFileTest extends AbstractTestCase
public function testNewObjectState(): void
{
// Check default dynamic values
$this->assertEquals(
self::assertEquals(
[],
$this->object->getConfig(),
);
// Check environment state
$this->assertEquals(
self::assertEquals(
[],
$_SESSION['ConfigFile1'],
);
// Validate default value used in tests
$defaultValue = $this->object->getDefault(self::SIMPLE_KEY_WITH_DEFAULT_VALUE);
$this->assertNotNull($defaultValue);
self::assertNotNull($defaultValue);
}
/**
@ -89,7 +89,7 @@ class ConfigFileTest extends AbstractTestCase
$this->object->set(self::SIMPLE_KEY_WITH_DEFAULT_VALUE, $defaultSimpleValue);
$this->object->set('Servers/1/host', $defaultHost);
$this->object->set('Servers/2/host', $defaultHost);
$this->assertEmpty($this->object->getConfig());
self::assertEmpty($this->object->getConfig());
/**
* Case 2: persistent keys should be always present in flat array,
@ -97,8 +97,8 @@ class ConfigFileTest extends AbstractTestCase
*/
$this->object->setPersistKeys(array_keys($defaultConfig));
$this->object->resetConfigData();
$this->assertEmpty($this->object->getConfig());
$this->assertEquals(
self::assertEmpty($this->object->getConfig());
self::assertEquals(
$defaultConfig,
$this->object->getConfigArray(),
);
@ -108,7 +108,7 @@ class ConfigFileTest extends AbstractTestCase
* even if set to default values
*/
$this->object->set('Servers/2/host', $defaultHost);
$this->assertEquals(
self::assertEquals(
['Servers' => [2 => ['host' => $defaultHost]]],
$this->object->getConfig(),
);
@ -127,7 +127,7 @@ class ConfigFileTest extends AbstractTestCase
$this->object->set('b', 2);
$this->object->set('c', 3);
$this->assertEquals(
self::assertEquals(
['a' => 1, 'c' => 3],
$this->object->getConfig(),
);
@ -138,7 +138,7 @@ class ConfigFileTest extends AbstractTestCase
$this->object->setAllowedKeys(null);
$this->object->set('b', 2);
$this->assertEquals(
self::assertEquals(
['a' => 1, 'b' => 2, 'c' => 3],
$this->object->getConfig(),
);
@ -156,11 +156,11 @@ class ConfigFileTest extends AbstractTestCase
$this->object->set('Servers/1/passthrough2', 2);
$this->object->updateWithGlobalConfig(['Servers/value1' => 3]);
$this->assertEquals(
self::assertEquals(
['Servers' => [1 => ['passthrough1' => 1, 'passthrough2' => 2, 'value1' => 3]]],
$this->object->getConfig(),
);
$this->assertEquals(
self::assertEquals(
3,
$this->object->get('Servers/1/value1'),
);
@ -175,8 +175,8 @@ class ConfigFileTest extends AbstractTestCase
$this->object->resetConfigData();
$this->assertEmpty($this->object->getConfig());
$this->assertEmpty($this->object->getConfigArray());
self::assertEmpty($this->object->getConfig());
self::assertEmpty($this->object->getConfigArray());
}
/**
@ -187,11 +187,11 @@ class ConfigFileTest extends AbstractTestCase
$this->object->set('abc', 'should be deleted by setConfigData');
$this->object->setConfigData(['a' => 'b']);
$this->assertEquals(
self::assertEquals(
['a' => 'b'],
$this->object->getConfig(),
);
$this->assertEquals(
self::assertEquals(
['a' => 'b'],
$this->object->getConfigArray(),
);
@ -208,29 +208,29 @@ class ConfigFileTest extends AbstractTestCase
$this->object->set('Servers/4/host', $nonDefaultHost);
$this->object->set('Servers/5/host', $defaultHost);
$this->object->set('Servers/6/host', $defaultHost, 'Servers/6/host');
$this->assertEquals(
self::assertEquals(
$nonDefaultHost,
$this->object->get('Servers/4/host'),
);
$this->assertEquals(
self::assertEquals(
null,
$this->object->get('Servers/5/host'),
);
$this->assertEquals(
self::assertEquals(
$defaultHost,
$this->object->get('Servers/6/host'),
);
// return default value for nonexistent keys
$this->assertNull(
self::assertNull(
$this->object->get('key not excist'),
);
$this->assertEquals(
self::assertEquals(
[1],
$this->object->get('key not excist', [1]),
);
$default = new stdClass();
$this->assertInstanceOf(
self::assertInstanceOf(
stdClass::class,
$this->object->get('key not excist', $default),
);
@ -245,7 +245,7 @@ class ConfigFileTest extends AbstractTestCase
// default values are not written
$this->object->set(self::SIMPLE_KEY_WITH_DEFAULT_VALUE, $defaultValue);
$this->assertEmpty($this->object->getConfig());
self::assertEmpty($this->object->getConfig());
}
/**
@ -260,7 +260,7 @@ class ConfigFileTest extends AbstractTestCase
[self::SIMPLE_KEY_WITH_DEFAULT_VALUE => $defaultValue],
);
$this->object->set(self::SIMPLE_KEY_WITH_DEFAULT_VALUE, $defaultValue);
$this->assertEmpty($this->object->getConfig());
self::assertEmpty($this->object->getConfig());
// but if config.inc.php differs from the default values,
// allow to overwrite with value from the default values
@ -269,7 +269,7 @@ class ConfigFileTest extends AbstractTestCase
[self::SIMPLE_KEY_WITH_DEFAULT_VALUE => $configIncPhpValue],
);
$this->object->set(self::SIMPLE_KEY_WITH_DEFAULT_VALUE, $defaultValue);
$this->assertEquals(
self::assertEquals(
[self::SIMPLE_KEY_WITH_DEFAULT_VALUE => $defaultValue],
$this->object->getConfig(),
);
@ -284,16 +284,16 @@ class ConfigFileTest extends AbstractTestCase
$flatDefaultConfig = $this->object->getFlatDefaultConfig();
$defaultValue = $this->object->getDefault(self::SIMPLE_KEY_WITH_DEFAULT_VALUE);
$this->assertEquals($defaultValue, $flatDefaultConfig[self::SIMPLE_KEY_WITH_DEFAULT_VALUE]);
self::assertEquals($defaultValue, $flatDefaultConfig[self::SIMPLE_KEY_WITH_DEFAULT_VALUE]);
$localhostValue = $this->object->getDefault('Servers/1/host');
$this->assertEquals($localhostValue, $flatDefaultConfig['Servers/1/host']);
self::assertEquals($localhostValue, $flatDefaultConfig['Servers/1/host']);
$settings = new Settings([]);
$cfg = $settings->asArray();
$this->assertGreaterThanOrEqual(100, count($cfg));
$this->assertGreaterThanOrEqual(count($cfg), count($flatDefaultConfig));
self::assertGreaterThanOrEqual(100, count($cfg));
self::assertGreaterThanOrEqual(count($cfg), count($flatDefaultConfig));
}
/**
@ -305,7 +305,7 @@ class ConfigFileTest extends AbstractTestCase
$this->object->set('key2', 'value');
$this->object->updateWithGlobalConfig(['key' => 'ABC']);
$this->assertEquals(
self::assertEquals(
['key' => 'ABC', 'key2' => 'value'],
$this->object->getConfig(),
);
@ -316,12 +316,12 @@ class ConfigFileTest extends AbstractTestCase
*/
public function testGetCanonicalPath(): void
{
$this->assertEquals(
self::assertEquals(
'Servers/1/abcd',
$this->object->getCanonicalPath('Servers/2/abcd'),
);
$this->assertEquals(
self::assertEquals(
'Servers/foo/bar',
$this->object->getCanonicalPath('Servers/foo/bar'),
);
@ -334,14 +334,14 @@ class ConfigFileTest extends AbstractTestCase
{
$cfgDb = $this->object->getAllowedValues();
// verify that $cfg_db read from config.values.php is valid
$this->assertGreaterThanOrEqual(20, count($cfgDb));
self::assertGreaterThanOrEqual(20, count($cfgDb));
$this->assertEquals(
self::assertEquals(
$cfgDb['Servers'][1]['port'],
$this->object->getDbEntry('Servers/1/port'),
);
$this->assertNull($this->object->getDbEntry('no such key'));
$this->assertEquals(
self::assertNull($this->object->getDbEntry('no such key'));
self::assertEquals(
[1],
$this->object->getDbEntry('no such key', [1]),
);
@ -358,7 +358,7 @@ class ConfigFileTest extends AbstractTestCase
$this->object->set('Servers/4/x', 4);
$this->object->set('ServerDefault', 3);
$this->assertEquals(
self::assertEquals(
4,
$this->object->getServerCount(),
);
@ -366,20 +366,20 @@ class ConfigFileTest extends AbstractTestCase
$this->object->removeServer(2);
$this->object->removeServer(2);
$this->assertEquals(
self::assertEquals(
2,
$this->object->getServerCount(),
);
$this->assertLessThanOrEqual(
self::assertLessThanOrEqual(
2,
$this->object->get('ServerDefault'),
);
$this->assertEquals(
self::assertEquals(
['Servers' => [1 => ['x' => 1], 2 => ['x' => 4]]],
$this->object->getConfig(),
);
$this->assertEquals(
self::assertEquals(
['Servers/1/x' => 1, 'Servers/2/x' => 4],
$this->object->getConfigArray(),
);
@ -393,7 +393,7 @@ class ConfigFileTest extends AbstractTestCase
$this->object->set('Servers/1/x', 'a');
$this->object->set('Servers/2/x', 'b');
$this->assertEquals(
self::assertEquals(
[1 => ['x' => 'a'], 2 => ['x' => 'b']],
$this->object->getServers(),
);
@ -404,7 +404,7 @@ class ConfigFileTest extends AbstractTestCase
*/
public function testGetServerDSN(): void
{
$this->assertEquals(
self::assertEquals(
'',
$this->object->getServerDSN(1),
);
@ -421,7 +421,7 @@ class ConfigFileTest extends AbstractTestCase
],
],
);
$this->assertEquals(
self::assertEquals(
'mysqli://testUser@example.com:21',
$this->object->getServerDSN(1),
);
@ -440,7 +440,7 @@ class ConfigFileTest extends AbstractTestCase
],
],
);
$this->assertEquals(
self::assertEquals(
'mysqli://testUser@123',
$this->object->getServerDSN(1),
);
@ -458,7 +458,7 @@ class ConfigFileTest extends AbstractTestCase
],
],
);
$this->assertEquals(
self::assertEquals(
'mysqli://testUser:***@example.com:21',
$this->object->getServerDSN(1),
);
@ -469,19 +469,19 @@ class ConfigFileTest extends AbstractTestCase
*/
public function testGetServerName(): void
{
$this->assertEquals(
self::assertEquals(
'',
$this->object->getServerName(1),
);
$this->object->set('Servers/1/host', 'example.com');
$this->assertEquals(
self::assertEquals(
'example.com',
$this->object->getServerName(1),
);
$this->object->set('Servers/1/verbose', 'testData');
$this->assertEquals(
self::assertEquals(
'testData',
$this->object->getServerName(1),
);
@ -496,7 +496,7 @@ class ConfigFileTest extends AbstractTestCase
$this->object->set('Array/test', ['x', 'y']);
$defaultValue = $this->object->getDefault(self::SIMPLE_KEY_WITH_DEFAULT_VALUE);
$this->assertEquals(
self::assertEquals(
[self::SIMPLE_KEY_WITH_DEFAULT_VALUE => $defaultValue, 'Array/test' => ['x', 'y']],
$this->object->getConfigArray(),
);

View File

@ -35,7 +35,7 @@ class DescriptionTest extends AbstractTestCase
#[DataProvider('getValues')]
public function testGet(string $item, string $type, string $expected): void
{
$this->assertEquals($expected, Descriptions::get($item, $type));
self::assertEquals($expected, Descriptions::get($item, $type));
}
/**
@ -72,9 +72,9 @@ class DescriptionTest extends AbstractTestCase
*/
public function assertGet(string $key): void
{
$this->assertNotNull(Descriptions::get($key, 'name'));
$this->assertNotNull(Descriptions::get($key, 'desc'));
$this->assertNotNull(Descriptions::get($key, 'cmt'));
self::assertNotNull(Descriptions::get($key, 'name'));
self::assertNotNull(Descriptions::get($key, 'desc'));
self::assertNotNull(Descriptions::get($key, 'cmt'));
}
/**
@ -90,8 +90,8 @@ class DescriptionTest extends AbstractTestCase
foreach ($cfg as $key => $value) {
$this->assertGet($key);
if ($key === 'Servers') {
$this->assertIsArray($value);
$this->assertIsArray($value[1]);
self::assertIsArray($value);
self::assertIsArray($value[1]);
foreach ($value[1] as $item => $val) {
$this->assertGet($key . '/1/' . $item);
if ($item !== 'AllowDeny') {
@ -99,12 +99,12 @@ class DescriptionTest extends AbstractTestCase
}
foreach ($val as $second => $val2) {
$this->assertNotNull($val2);
self::assertNotNull($val2);
$this->assertGet($key . '/1/' . $item . '/' . $second);
}
}
} elseif (in_array($key, $nested)) {
$this->assertIsArray($value);
self::assertIsArray($value);
foreach (array_keys($value) as $item) {
$this->assertGet($key . '/' . $item);
}

View File

@ -52,31 +52,31 @@ class FormDisplayTemplateTest extends AbstractTestCase
$opts,
);
$this->assertStringContainsString('<tr class="group-header-field group-header-1 disabled-field">', $result);
self::assertStringContainsString('<tr class="group-header-field group-header-1 disabled-field">', $result);
$this->assertStringContainsString('<label for="test/path">', $result);
self::assertStringContainsString('<label for="test/path">', $result);
$this->assertStringContainsString('<a href="https://example.com/" target="documentation"', $result);
self::assertStringContainsString('<a href="https://example.com/" target="documentation"', $result);
$this->assertStringContainsString(
self::assertStringContainsString(
'<img src="themes/dot.gif" title="Documentation" alt="Documentation" class="icon ic_b_help"',
$result,
);
$this->assertStringContainsString('<span class="disabled-notice"', $result);
self::assertStringContainsString('<span class="disabled-notice"', $result);
$this->assertStringContainsString('<small>', $result);
self::assertStringContainsString('<small>', $result);
$this->assertStringContainsString(
self::assertStringContainsString(
'<input type="text" name="test/path" id="test/path" value="val" class="w-75 custom field-error">',
$result,
);
$this->assertStringContainsString('<a class="restore-default hide" href="#test/path"', $result);
self::assertStringContainsString('<a class="restore-default hide" href="#test/path"', $result);
$this->assertStringContainsString('<dl class="inline_errors">', $result);
$this->assertStringContainsString('<dd>e1</dd>', $result);
$this->assertStringContainsString('</dl>', $result);
self::assertStringContainsString('<dl class="inline_errors">', $result);
self::assertStringContainsString('<dd>e1</dd>', $result);
self::assertStringContainsString('</dl>', $result);
// second case
@ -99,18 +99,18 @@ class FormDisplayTemplateTest extends AbstractTestCase
$opts,
);
$this->assertStringContainsString('<tr class="group-field group-field-1">', $result);
self::assertStringContainsString('<tr class="group-field group-field-1">', $result);
$this->assertStringContainsString('<input type="checkbox" name="test/path" id="test/path" checked>', $result);
self::assertStringContainsString('<input type="checkbox" name="test/path" id="test/path" checked>', $result);
$this->assertStringContainsString('<a class="userprefs-comment" title="userprefsComment">', $result);
self::assertStringContainsString('<a class="userprefs-comment" title="userprefsComment">', $result);
$this->assertStringContainsString(
self::assertStringContainsString(
'<td class="userprefs-allow" title="Allow users to customize this value">',
$result,
);
$this->assertStringContainsString(
self::assertStringContainsString(
'<a class="set-value hide" href="#test/path=setVal" title="Set value: setVal">',
$result,
);
@ -129,7 +129,7 @@ class FormDisplayTemplateTest extends AbstractTestCase
$opts,
);
$this->assertStringContainsString(
self::assertStringContainsString(
'<input type="text" size="25" name="test/path" id="test/path" value="val" class="">',
$result,
);
@ -145,7 +145,7 @@ class FormDisplayTemplateTest extends AbstractTestCase
$opts,
);
$this->assertStringContainsString(
self::assertStringContainsString(
'<input type="number" name="test/path" id="test/path" value="val" class="">',
$result,
);
@ -155,13 +155,13 @@ class FormDisplayTemplateTest extends AbstractTestCase
$opts['values_disabled'] = [1, 2];
$opts['values'] = [1 => 'test', 'key1' => true, 'key2' => false];
$result = $this->formDisplayTemplate->displayInput('test/path', 'testName', 'select', true, '', true, $opts);
$this->assertStringContainsString('<select name="test/path" id="test/path" class="w-75">', $result);
self::assertStringContainsString('<select name="test/path" id="test/path" class="w-75">', $result);
$this->assertStringContainsString('<option value="1" selected disabled>', $result);
self::assertStringContainsString('<option value="1" selected disabled>', $result);
$this->assertStringContainsString('<option value="key1">', $result);
self::assertStringContainsString('<option value="key1">', $result);
$this->assertStringContainsString('<option value="key2">', $result);
self::assertStringContainsString('<option value="key2">', $result);
// select case 2
$opts['values_escaped'] = false;
@ -169,10 +169,10 @@ class FormDisplayTemplateTest extends AbstractTestCase
$opts['values'] = ['a<b' => 'c&d', 'key1' => true, 'key2' => false];
$result = $this->formDisplayTemplate->displayInput('test/path', 'testName', 'select', false, '', true, $opts);
$this->assertStringContainsString('<select name="test/path" id="test/path" class="w-75">', $result);
self::assertStringContainsString('<select name="test/path" id="test/path" class="w-75">', $result);
// assertContains doesn't seem to work with htmlentities
$this->assertStringContainsString('<option value="a&lt;b">c&amp;d</option>', $result);
self::assertStringContainsString('<option value="a&lt;b">c&amp;d</option>', $result);
// list
$result = $this->formDisplayTemplate->displayInput(
@ -185,7 +185,7 @@ class FormDisplayTemplateTest extends AbstractTestCase
$opts,
);
$this->assertStringContainsString(
self::assertStringContainsString(
'<textarea cols="35" rows="5" name="test/path" id="test/path" class="">',
$result,
);
@ -196,7 +196,7 @@ class FormDisplayTemplateTest extends AbstractTestCase
*/
public function testDisplayGroupHeader(): void
{
$this->assertEquals(
self::assertEquals(
'',
$this->formDisplayTemplate->displayGroupHeader(''),
);
@ -207,7 +207,7 @@ class FormDisplayTemplateTest extends AbstractTestCase
$result = $this->formDisplayTemplate->displayGroupHeader('headerText');
$this->assertStringContainsString('<tr class="group-header group-header-4">', $result);
self::assertStringContainsString('<tr class="group-header group-header-4">', $result);
// without PMA_SETUP
$this->config->set('is_setup', false);
@ -216,7 +216,7 @@ class FormDisplayTemplateTest extends AbstractTestCase
$result = $this->formDisplayTemplate->displayGroupHeader('headerText');
$this->assertStringContainsString('<tr class="group-header group-header-4">', $result);
self::assertStringContainsString('<tr class="group-header group-header-4">', $result);
}
/**
@ -226,7 +226,7 @@ class FormDisplayTemplateTest extends AbstractTestCase
{
$this->formDisplayTemplate->group = 3;
$this->formDisplayTemplate->displayGroupFooter();
$this->assertEquals(2, $this->formDisplayTemplate->group);
self::assertEquals(2, $this->formDisplayTemplate->group);
}
/**
@ -240,7 +240,7 @@ class FormDisplayTemplateTest extends AbstractTestCase
$this->formDisplayTemplate->addJsValidate('testID', $validators, $js);
$this->assertEquals(
self::assertEquals(
[
'window.Config.registerFieldValidator(\'testID\', \'\\\';\', true, '
. '["\\\\r\\\\n\\\\\''

View File

@ -62,18 +62,18 @@ class FormDisplayTest extends AbstractTestCase
$this->object->registerForm('pma_testform', $array, 2);
$forms = $attrForms->getValue($this->object);
$this->assertInstanceOf(Form::class, $forms['pma_testform']);
self::assertInstanceOf(Form::class, $forms['pma_testform']);
$attrSystemPaths = $reflection->getProperty('systemPaths');
$this->assertEquals(
self::assertEquals(
['Servers/2/test' => 'Servers/1/test', 'Servers/2/:group:end:0' => 'Servers/1/:group:end:0'],
$attrSystemPaths->getValue($this->object),
);
$attrTranslatedPaths = $reflection->getProperty('translatedPaths');
$this->assertEquals(
self::assertEquals(
['Servers/2/test' => 'Servers-2-test', 'Servers/2/:group:end:0' => 'Servers-2-:group:end:0'],
$attrTranslatedPaths->getValue($this->object),
);
@ -85,7 +85,7 @@ class FormDisplayTest extends AbstractTestCase
#[Group('medium')]
public function testProcess(): void
{
$this->assertFalse(
self::assertFalse(
$this->object->process(true, true),
);
@ -97,18 +97,18 @@ class FormDisplayTest extends AbstractTestCase
$attrForms = new ReflectionProperty(FormDisplay::class, 'forms');
$attrForms->setValue($this->object, [1, 2, 3]);
$this->object->expects($this->once())
$this->object->expects(self::once())
->method('save')
->with([0, 1, 2], false)
->willReturn(true);
$this->assertTrue(
self::assertTrue(
$this->object->process(false, false),
);
$attrForms->setValue($this->object, []);
$this->assertFalse(
self::assertFalse(
$this->object->process(false, false),
);
}
@ -128,7 +128,7 @@ class FormDisplayTest extends AbstractTestCase
$result = $this->object->displayErrors();
$this->assertSame($result, '');
self::assertSame($result, '');
$arr = ['Servers/1/test' => ['e1'], 'foobar' => ['e2', 'e3']];
@ -141,11 +141,11 @@ class FormDisplayTest extends AbstractTestCase
$result = $this->object->displayErrors();
$this->assertStringContainsString('<dt>Servers/1/test2</dt>', $result);
$this->assertStringContainsString('<dd>e1</dd>', $result);
$this->assertStringContainsString('<dt>Form_foobar</dt>', $result);
$this->assertStringContainsString('<dd>e2</dd>', $result);
$this->assertStringContainsString('<dd>e3</dd>', $result);
self::assertStringContainsString('<dt>Servers/1/test2</dt>', $result);
self::assertStringContainsString('<dd>e1</dd>', $result);
self::assertStringContainsString('<dt>Form_foobar</dt>', $result);
self::assertStringContainsString('<dd>e2</dd>', $result);
self::assertStringContainsString('<dd>e3</dd>', $result);
}
/**
@ -174,7 +174,7 @@ class FormDisplayTest extends AbstractTestCase
$this->object->fixErrors();
$this->assertEquals(
self::assertEquals(
['Servers' => ['1' => ['test' => 'localhost']]],
$_SESSION['ConfigFile2'],
);
@ -189,7 +189,7 @@ class FormDisplayTest extends AbstractTestCase
$arr = ['foo' => 'var'];
$value = 'foo';
$this->assertTrue(
self::assertTrue(
$attrValidateSelect->invokeArgs(
$this->object,
[&$value, $arr],
@ -198,20 +198,20 @@ class FormDisplayTest extends AbstractTestCase
$arr = ['' => 'foobar'];
$value = '';
$this->assertTrue(
self::assertTrue(
$attrValidateSelect->invokeArgs(
$this->object,
[&$value, $arr],
),
);
$this->assertEquals(
self::assertEquals(
'string',
gettype($value),
);
$arr = [0 => 'foobar'];
$value = 0;
$this->assertTrue(
self::assertTrue(
$attrValidateSelect->invokeArgs(
$this->object,
[&$value, $arr],
@ -220,7 +220,7 @@ class FormDisplayTest extends AbstractTestCase
$arr = ['1' => 'foobar'];
$value = 0;
$this->assertFalse(
self::assertFalse(
$attrValidateSelect->invokeArgs(
$this->object,
[&$value, $arr],
@ -233,14 +233,14 @@ class FormDisplayTest extends AbstractTestCase
*/
public function testHasErrors(): void
{
$this->assertFalse($this->object->hasErrors());
self::assertFalse($this->object->hasErrors());
(new ReflectionProperty(FormDisplay::class, 'errors'))->setValue(
$this->object,
[1, 2],
);
$this->assertTrue($this->object->hasErrors());
self::assertTrue($this->object->hasErrors());
}
/**
@ -248,18 +248,18 @@ class FormDisplayTest extends AbstractTestCase
*/
public function testGetDocLink(): void
{
$this->assertEquals(
self::assertEquals(
'index.php?route=/url&url='
. 'https%3A%2F%2Fdocs.phpmyadmin.net%2Fen%2Flatest%2Fconfig.html%23cfg_Servers_3_test_2_',
$this->object->getDocLink('Servers/3/test/2/'),
);
$this->assertEquals(
self::assertEquals(
'',
$this->object->getDocLink('Import'),
);
$this->assertEquals(
self::assertEquals(
'',
$this->object->getDocLink('Export'),
);
@ -272,12 +272,12 @@ class FormDisplayTest extends AbstractTestCase
{
$method = new ReflectionMethod(FormDisplay::class, 'getOptName');
$this->assertEquals(
self::assertEquals(
'Servers_',
$method->invoke($this->object, 'Servers/1/'),
);
$this->assertEquals(
self::assertEquals(
'Servers_23_',
$method->invoke($this->object, 'Servers/1/23/'),
);
@ -293,7 +293,7 @@ class FormDisplayTest extends AbstractTestCase
$attrUserprefs = new ReflectionProperty(FormDisplay::class, 'userprefsDisallow');
$method->invoke($this->object, null);
$this->assertEquals(
self::assertEquals(
[],
$attrUserprefs->getValue($this->object),
);
@ -328,7 +328,7 @@ class FormDisplayTest extends AbstractTestCase
$expect['comment_warning'] = 1;
$this->assertEquals($expect, $opts);
self::assertEquals($expect, $opts);
// ZipDump, GZipDump, BZipDump
$method->invokeArgs(
@ -346,9 +346,9 @@ class FormDisplayTest extends AbstractTestCase
'due to missing function gzcompress.';
}
$this->assertEquals($comment, $opts['comment']);
self::assertEquals($comment, $opts['comment']);
$this->assertTrue($opts['comment_warning']);
self::assertTrue($opts['comment_warning']);
$method->invokeArgs(
$this->object,
@ -365,9 +365,9 @@ class FormDisplayTest extends AbstractTestCase
'due to missing function gzencode.';
}
$this->assertEquals($comment, $opts['comment']);
self::assertEquals($comment, $opts['comment']);
$this->assertTrue($opts['comment_warning']);
self::assertTrue($opts['comment_warning']);
$method->invokeArgs(
$this->object,
@ -384,9 +384,9 @@ class FormDisplayTest extends AbstractTestCase
'due to missing function bzcompress.';
}
$this->assertEquals($comment, $opts['comment']);
self::assertEquals($comment, $opts['comment']);
$this->assertTrue($opts['comment_warning']);
self::assertTrue($opts['comment_warning']);
$config = Config::getInstance();
$config->set('is_setup', false);
@ -400,20 +400,20 @@ class FormDisplayTest extends AbstractTestCase
['MaxDbList', &$opts],
);
$this->assertEquals('maximum 10', $opts['comment']);
self::assertEquals('maximum 10', $opts['comment']);
$method->invokeArgs(
$this->object,
['MaxTableList', &$opts],
);
$this->assertEquals('maximum 10', $opts['comment']);
self::assertEquals('maximum 10', $opts['comment']);
$method->invokeArgs(
$this->object,
['QueryHistoryMax', &$opts],
);
$this->assertEquals('maximum 10', $opts['comment']);
self::assertEquals('maximum 10', $opts['comment']);
}
}

View File

@ -53,9 +53,9 @@ class FormTest extends AbstractTestCase
#[Group('medium')]
public function testContructor(): void
{
$this->assertEquals(1, $this->object->index);
$this->assertEquals('pma_form_name', $this->object->name);
$this->assertArrayHasKey('pma_form1', $this->object->fields);
self::assertEquals(1, $this->object->index);
self::assertEquals('pma_form_name', $this->object->name);
self::assertArrayHasKey('pma_form1', $this->object->fields);
}
/**
@ -68,11 +68,11 @@ class FormTest extends AbstractTestCase
['7' => 'Seven'],
);
$this->assertNull(
self::assertNull(
$this->object->getOptionType('123/4/5/6'),
);
$this->assertEquals(
self::assertEquals(
'Seven',
$this->object->getOptionType('123/4/5/7'),
);
@ -83,17 +83,17 @@ class FormTest extends AbstractTestCase
*/
public function testGetOptionValueList(): void
{
$this->assertEquals(
self::assertEquals(
['NHibernate C# DO', 'NHibernate XML'],
$this->object->getOptionValueList('Export/codegen_format'),
);
$this->assertEquals(
self::assertEquals(
['auto' => 'auto', '1' => 1, '0' => 0],
$this->object->getOptionValueList('OBGzip'),
);
$this->assertEquals(
self::assertEquals(
['none' => 'Nowhere', 'left' => 'Left', 'right' => 'Right', 'both' => 'Both'],
$this->object->getOptionValueList('RowActionLinks'),
);
@ -113,16 +113,16 @@ class FormTest extends AbstractTestCase
$result = $this->object->fields;
$this->assertCount(4, $result);
self::assertCount(4, $result);
$this->assertEquals('pma_form1', $result['pma_form1']);
self::assertEquals('pma_form1', $result['pma_form1']);
$this->assertEquals('pma_form2', $result['pma_form2']);
self::assertEquals('pma_form2', $result['pma_form2']);
$this->assertEquals('preffoo/foo/bar/test', $result[0]);
self::assertEquals('preffoo/foo/bar/test', $result[0]);
// needs regexp because the counter is static
$this->assertMatchesRegularExpression('/^preffoo\/foo\/bar\/\:group\:end\:\d+$/', $result[1]);
self::assertMatchesRegularExpression('/^preffoo\/foo\/bar\/\:group\:end\:\d+$/', $result[1]);
}
/**
@ -139,22 +139,22 @@ class FormTest extends AbstractTestCase
$result = $this->object->fields;
$this->assertCount(2, $result);
self::assertCount(2, $result);
$this->assertEquals('foo/bar/test', $result['test']);
self::assertEquals('foo/bar/test', $result['test']);
unset($result['test']);
// needs regexp because the counter is static
$key = array_keys($result)[0];
$this->assertIsString($key);
self::assertIsString($key);
$this->assertMatchesRegularExpression('/^\:group\:end\:(\d+)$/', $key);
self::assertMatchesRegularExpression('/^\:group\:end\:(\d+)$/', $key);
preg_match('/^\:group\:end\:(\d+)$/', $key, $matches);
$digit = $matches[1];
$this->assertEquals('foo/bar/:group:end:' . $digit, $result[':group:end:' . $digit]);
self::assertEquals('foo/bar/:group:end:' . $digit, $result[':group:end:' . $digit]);
}
/**
@ -176,7 +176,7 @@ class FormTest extends AbstractTestCase
$method->invoke($this->object, null);
$this->assertEquals(
self::assertEquals(
['pma_form1' => 'integer', 'pma_form2' => 'select', ':group:end:0' => 'group', '1' => 'NULL'],
$attrFieldsTypes->getValue($this->object),
);
@ -192,16 +192,16 @@ class FormTest extends AbstractTestCase
->onlyMethods(['readFormPaths', 'readTypes'])
->getMock();
$this->object->expects($this->exactly(1))
$this->object->expects(self::exactly(1))
->method('readFormPaths')
->with(['testForm']);
$this->object->expects($this->exactly(1))
$this->object->expects(self::exactly(1))
->method('readTypes');
$this->object->loadForm('pmaform', ['testForm']);
$this->assertEquals('pmaform', $this->object->name);
self::assertEquals('pmaform', $this->object->name);
}
/**
@ -214,7 +214,7 @@ class FormTest extends AbstractTestCase
->onlyMethods(['readFormPaths', 'readTypes'])
->getMock();
$this->object->expects($this->exactly(1))->method('readFormPaths')->with([
$this->object->expects(self::exactly(1))->method('readFormPaths')->with([
':group:OpenDocument-OpenOffice 試算表',
'group:test/data',
'Export/ods_columns',

View File

@ -45,23 +45,23 @@ class FormListTest extends AbstractTestCase
$cf = new ConfigFile(Config::getInstance()->baseSettings);
/* Static API */
$this->assertTrue($class::isValid('Export'));
$this->assertEquals($prefix, $class::get('Export'));
self::assertTrue($class::isValid('Export'));
self::assertEquals($prefix, $class::get('Export'));
foreach ($class::getAllFormNames() as $form) {
$formClass = $class::get($form);
$this->assertNotNull($formClass);
$this->assertNotNull($formClass::getName());
self::assertNotNull($formClass);
self::assertNotNull($formClass::getName());
}
$this->assertContains('Export/texytext_columns', $class::getFields());
self::assertContains('Export/texytext_columns', $class::getFields());
/* Instance handling */
$forms = new $class($cf);
$this->assertInstanceOf(BaseFormList::class, $forms);
$this->assertFalse($forms->process());
self::assertInstanceOf(BaseFormList::class, $forms);
self::assertFalse($forms->process());
$forms->fixErrors();
$this->assertFalse($forms->hasErrors());
$this->assertEquals('', $forms->displayErrors());
self::assertFalse($forms->hasErrors());
self::assertEquals('', $forms->displayErrors());
}
/**

View File

@ -47,7 +47,7 @@ class PageSettingsTest extends AbstractTestCase
$object = new PageSettings(new UserPreferences($dbi, new Relation($dbi), new Template()));
$object->init('NonExistent');
$this->assertEquals('', $object->getHTML());
self::assertEquals('', $object->getHTML());
}
/**
@ -67,7 +67,7 @@ class PageSettingsTest extends AbstractTestCase
$html = $object->getHTML();
// Test some sample parts
$this->assertStringContainsString(
self::assertStringContainsString(
'<div id="page_settings_modal">'
. '<div class="page_settings">'
. '<form method="post" '
@ -76,9 +76,9 @@ class PageSettingsTest extends AbstractTestCase
$html,
);
$this->assertStringContainsString('<input type="hidden" name="submit_save" value="Browse">', $html);
self::assertStringContainsString('<input type="hidden" name="submit_save" value="Browse">', $html);
$this->assertStringContainsString(
self::assertStringContainsString(
"window.Config.registerFieldValidator('MaxRows', 'validatePositiveNumber', true);\n"
. "window.Config.registerFieldValidator('RepeatCells', 'validateNonNegativeNumber', true);\n"
. "window.Config.registerFieldValidator('LimitChars', 'validatePositiveNumber', true);\n",
@ -100,8 +100,8 @@ class PageSettingsTest extends AbstractTestCase
$html = $pageSettings->getHTML();
// Test some sample parts
$this->assertStringContainsString('<div id="pma_navigation_settings">', $html);
self::assertStringContainsString('<div id="pma_navigation_settings">', $html);
$this->assertStringContainsString('<input type="hidden" name="submit_save" value="Navi">', $html);
self::assertStringContainsString('<input type="hidden" name="submit_save" value="Navi">', $html);
}
}

View File

@ -77,7 +77,7 @@ class ServerConfigChecksTest extends AbstractTestCase
$configChecker->performConfigChecks();
$this->assertEquals(
self::assertEquals(
[
'Servers/1/ssl',
'Servers/1/auth_type',
@ -90,7 +90,7 @@ class ServerConfigChecksTest extends AbstractTestCase
array_keys($_SESSION['messages']['notice']),
);
$this->assertEquals(
self::assertEquals(
['LoginCookieValidity', 'GZipDump', 'BZipDump', 'ZipDump_import', 'ZipDump_export'],
array_keys($_SESSION['messages']['error']),
);
@ -120,14 +120,14 @@ class ServerConfigChecksTest extends AbstractTestCase
* @psalm-suppress TypeDoesNotContainType
*/
$secret = $_SESSION[$this->sessionID]['blowfish_secret'] ?? '';
$this->assertIsString($secret);
$this->assertSame(SODIUM_CRYPTO_SECRETBOX_KEYBYTES, mb_strlen($secret, '8bit'));
self::assertIsString($secret);
self::assertSame(SODIUM_CRYPTO_SECRETBOX_KEYBYTES, mb_strlen($secret, '8bit'));
$messages = $_SESSION['messages'] ?? null;
$this->assertIsArray($messages);
$this->assertArrayHasKey('notice', $messages);
$this->assertIsArray($messages['notice']);
$this->assertArrayHasKey('blowfish_secret_created', $messages['notice']);
$this->assertArrayNotHasKey('error', $messages);
self::assertIsArray($messages);
self::assertArrayHasKey('notice', $messages);
self::assertIsArray($messages['notice']);
self::assertArrayHasKey('blowfish_secret_created', $messages['notice']);
self::assertArrayNotHasKey('error', $messages);
}
/**
@ -150,14 +150,14 @@ class ServerConfigChecksTest extends AbstractTestCase
* @psalm-suppress TypeDoesNotContainType
*/
$secret = $_SESSION[$this->sessionID]['blowfish_secret'] ?? '';
$this->assertIsString($secret);
$this->assertSame(SODIUM_CRYPTO_SECRETBOX_KEYBYTES, mb_strlen($secret, '8bit'));
self::assertIsString($secret);
self::assertSame(SODIUM_CRYPTO_SECRETBOX_KEYBYTES, mb_strlen($secret, '8bit'));
$messages = $_SESSION['messages'] ?? null;
$this->assertIsArray($messages);
$this->assertArrayHasKey('notice', $messages);
$this->assertIsArray($messages['notice']);
$this->assertArrayHasKey('blowfish_secret_created', $messages['notice']);
$this->assertArrayNotHasKey('error', $messages);
self::assertIsArray($messages);
self::assertArrayHasKey('notice', $messages);
self::assertIsArray($messages['notice']);
self::assertArrayHasKey('blowfish_secret_created', $messages['notice']);
self::assertArrayNotHasKey('error', $messages);
}
/**
@ -178,13 +178,13 @@ class ServerConfigChecksTest extends AbstractTestCase
* @psalm-suppress TypeDoesNotContainType
*/
$secret = $_SESSION[$this->sessionID]['blowfish_secret'] ?? '';
$this->assertIsString($secret);
$this->assertSame(SODIUM_CRYPTO_SECRETBOX_KEYBYTES, mb_strlen($secret, '8bit'));
self::assertIsString($secret);
self::assertSame(SODIUM_CRYPTO_SECRETBOX_KEYBYTES, mb_strlen($secret, '8bit'));
$messages = $_SESSION['messages'] ?? null;
$this->assertIsArray($messages);
$this->assertArrayHasKey('notice', $messages);
$this->assertIsArray($messages['notice']);
$this->assertArrayNotHasKey('blowfish_secret_created', $messages['notice']);
$this->assertArrayNotHasKey('error', $messages);
self::assertIsArray($messages);
self::assertArrayHasKey('notice', $messages);
self::assertIsArray($messages['notice']);
self::assertArrayNotHasKey('blowfish_secret_created', $messages['notice']);
self::assertArrayNotHasKey('error', $messages);
}
}

View File

@ -18,8 +18,8 @@ class ConsoleTest extends TestCase
$console = new Console(['StartHistory' => $actual]);
$consoleArray = $console->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $console->StartHistory);
$this->assertSame($expected, $consoleArray['StartHistory']);
self::assertSame($expected, $console->StartHistory);
self::assertSame($expected, $consoleArray['StartHistory']);
}
/** @return iterable<string, array{mixed, bool}> */
@ -37,8 +37,8 @@ class ConsoleTest extends TestCase
$console = new Console(['AlwaysExpand' => $actual]);
$consoleArray = $console->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $console->AlwaysExpand);
$this->assertSame($expected, $consoleArray['AlwaysExpand']);
self::assertSame($expected, $console->AlwaysExpand);
self::assertSame($expected, $consoleArray['AlwaysExpand']);
}
#[DataProvider('booleanWithDefaultTrueProvider')]
@ -47,8 +47,8 @@ class ConsoleTest extends TestCase
$console = new Console(['CurrentQuery' => $actual]);
$consoleArray = $console->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $console->CurrentQuery);
$this->assertSame($expected, $consoleArray['CurrentQuery']);
self::assertSame($expected, $console->CurrentQuery);
self::assertSame($expected, $consoleArray['CurrentQuery']);
}
/** @return iterable<string, array{mixed, bool}> */
@ -66,8 +66,8 @@ class ConsoleTest extends TestCase
$console = new Console(['EnterExecutes' => $actual]);
$consoleArray = $console->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $console->EnterExecutes);
$this->assertSame($expected, $consoleArray['EnterExecutes']);
self::assertSame($expected, $console->EnterExecutes);
self::assertSame($expected, $consoleArray['EnterExecutes']);
}
#[DataProvider('booleanWithDefaultFalseProvider')]
@ -76,8 +76,8 @@ class ConsoleTest extends TestCase
$console = new Console(['DarkTheme' => $actual]);
$consoleArray = $console->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $console->DarkTheme);
$this->assertSame($expected, $consoleArray['DarkTheme']);
self::assertSame($expected, $console->DarkTheme);
self::assertSame($expected, $consoleArray['DarkTheme']);
}
#[DataProvider('valuesForModeProvider')]
@ -86,8 +86,8 @@ class ConsoleTest extends TestCase
$console = new Console(['Mode' => $actual]);
$consoleArray = $console->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $console->Mode);
$this->assertSame($expected, $consoleArray['Mode']);
self::assertSame($expected, $console->Mode);
self::assertSame($expected, $consoleArray['Mode']);
}
/** @return iterable<string, array{mixed, string}> */
@ -106,8 +106,8 @@ class ConsoleTest extends TestCase
$console = new Console(['Height' => $actual]);
$consoleArray = $console->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $console->Height);
$this->assertSame($expected, $consoleArray['Height']);
self::assertSame($expected, $console->Height);
self::assertSame($expected, $consoleArray['Height']);
}
/** @return iterable<string, array{mixed, int}> */
@ -125,8 +125,8 @@ class ConsoleTest extends TestCase
$console = new Console(['GroupQueries' => $actual]);
$consoleArray = $console->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $console->GroupQueries);
$this->assertSame($expected, $consoleArray['GroupQueries']);
self::assertSame($expected, $console->GroupQueries);
self::assertSame($expected, $consoleArray['GroupQueries']);
}
#[DataProvider('valuesForOrderByProvider')]
@ -135,8 +135,8 @@ class ConsoleTest extends TestCase
$console = new Console(['OrderBy' => $actual]);
$consoleArray = $console->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $console->OrderBy);
$this->assertSame($expected, $consoleArray['OrderBy']);
self::assertSame($expected, $console->OrderBy);
self::assertSame($expected, $consoleArray['OrderBy']);
}
/** @return iterable<string, array{mixed, string}> */
@ -155,8 +155,8 @@ class ConsoleTest extends TestCase
$console = new Console(['Order' => $actual]);
$consoleArray = $console->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $console->Order);
$this->assertSame($expected, $consoleArray['Order']);
self::assertSame($expected, $console->Order);
self::assertSame($expected, $consoleArray['Order']);
}
/** @return iterable<string, array{mixed, string}> */

View File

@ -17,8 +17,8 @@ class DebugTest extends TestCase
{
$debug = new Debug(['sql' => $actual]);
$debugArray = $debug->asArray();
$this->assertSame($expected, $debug->sql);
$this->assertSame($expected, $debugArray['sql']);
self::assertSame($expected, $debug->sql);
self::assertSame($expected, $debugArray['sql']);
}
#[DataProvider('booleanWithDefaultFalseProvider')]
@ -26,8 +26,8 @@ class DebugTest extends TestCase
{
$debug = new Debug(['sqllog' => $actual]);
$debugArray = $debug->asArray();
$this->assertSame($expected, $debug->sqllog);
$this->assertSame($expected, $debugArray['sqllog']);
self::assertSame($expected, $debug->sqllog);
self::assertSame($expected, $debugArray['sqllog']);
}
#[DataProvider('booleanWithDefaultFalseProvider')]
@ -35,8 +35,8 @@ class DebugTest extends TestCase
{
$debug = new Debug(['demo' => $actual]);
$debugArray = $debug->asArray();
$this->assertSame($expected, $debug->demo);
$this->assertSame($expected, $debugArray['demo']);
self::assertSame($expected, $debug->demo);
self::assertSame($expected, $debugArray['demo']);
}
#[DataProvider('booleanWithDefaultFalseProvider')]
@ -44,8 +44,8 @@ class DebugTest extends TestCase
{
$debug = new Debug(['simple2fa' => $actual]);
$debugArray = $debug->asArray();
$this->assertSame($expected, $debug->simple2fa);
$this->assertSame($expected, $debugArray['simple2fa']);
self::assertSame($expected, $debug->simple2fa);
self::assertSame($expected, $debugArray['simple2fa']);
}
/** @return iterable<string, array{mixed, bool}> */

File diff suppressed because it is too large Load Diff

View File

@ -18,8 +18,8 @@ class ImportTest extends TestCase
{
$import = new Import(['format' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->format);
$this->assertSame($expected, $importArray['format']);
self::assertSame($expected, $import->format);
self::assertSame($expected, $importArray['format']);
}
/** @return iterable<string, array{mixed, string}> */
@ -38,8 +38,8 @@ class ImportTest extends TestCase
{
$import = new Import(['charset' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->charset);
$this->assertSame($expected, $importArray['charset']);
self::assertSame($expected, $import->charset);
self::assertSame($expected, $importArray['charset']);
}
/** @return iterable<string, array{mixed, string}> */
@ -56,8 +56,8 @@ class ImportTest extends TestCase
{
$import = new Import(['allow_interrupt' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->allow_interrupt);
$this->assertSame($expected, $importArray['allow_interrupt']);
self::assertSame($expected, $import->allow_interrupt);
self::assertSame($expected, $importArray['allow_interrupt']);
}
/** @return iterable<string, array{mixed, bool}> */
@ -74,8 +74,8 @@ class ImportTest extends TestCase
{
$import = new Import(['skip_queries' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->skip_queries);
$this->assertSame($expected, $importArray['skip_queries']);
self::assertSame($expected, $import->skip_queries);
self::assertSame($expected, $importArray['skip_queries']);
}
/** @return iterable<string, array{mixed, int}> */
@ -93,8 +93,8 @@ class ImportTest extends TestCase
{
$import = new Import(['sql_compatibility' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->sql_compatibility);
$this->assertSame($expected, $importArray['sql_compatibility']);
self::assertSame($expected, $import->sql_compatibility);
self::assertSame($expected, $importArray['sql_compatibility']);
}
/** @return iterable<string, array{mixed, string}> */
@ -119,8 +119,8 @@ class ImportTest extends TestCase
{
$import = new Import(['sql_no_auto_value_on_zero' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->sql_no_auto_value_on_zero);
$this->assertSame($expected, $importArray['sql_no_auto_value_on_zero']);
self::assertSame($expected, $import->sql_no_auto_value_on_zero);
self::assertSame($expected, $importArray['sql_no_auto_value_on_zero']);
}
#[DataProvider('booleanWithDefaultFalseProvider')]
@ -128,8 +128,8 @@ class ImportTest extends TestCase
{
$import = new Import(['sql_read_as_multibytes' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->sql_read_as_multibytes);
$this->assertSame($expected, $importArray['sql_read_as_multibytes']);
self::assertSame($expected, $import->sql_read_as_multibytes);
self::assertSame($expected, $importArray['sql_read_as_multibytes']);
}
/** @return iterable<string, array{mixed, bool}> */
@ -146,8 +146,8 @@ class ImportTest extends TestCase
{
$import = new Import(['csv_replace' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->csv_replace);
$this->assertSame($expected, $importArray['csv_replace']);
self::assertSame($expected, $import->csv_replace);
self::assertSame($expected, $importArray['csv_replace']);
}
#[DataProvider('booleanWithDefaultFalseProvider')]
@ -155,8 +155,8 @@ class ImportTest extends TestCase
{
$import = new Import(['csv_ignore' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->csv_ignore);
$this->assertSame($expected, $importArray['csv_ignore']);
self::assertSame($expected, $import->csv_ignore);
self::assertSame($expected, $importArray['csv_ignore']);
}
#[DataProvider('valuesForCsvTerminatedProvider')]
@ -164,8 +164,8 @@ class ImportTest extends TestCase
{
$import = new Import(['csv_terminated' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->csv_terminated);
$this->assertSame($expected, $importArray['csv_terminated']);
self::assertSame($expected, $import->csv_terminated);
self::assertSame($expected, $importArray['csv_terminated']);
}
/** @return iterable<string, array{mixed, string}> */
@ -182,8 +182,8 @@ class ImportTest extends TestCase
{
$import = new Import(['csv_enclosed' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->csv_enclosed);
$this->assertSame($expected, $importArray['csv_enclosed']);
self::assertSame($expected, $import->csv_enclosed);
self::assertSame($expected, $importArray['csv_enclosed']);
}
/** @return iterable<string, array{mixed, string}> */
@ -200,8 +200,8 @@ class ImportTest extends TestCase
{
$import = new Import(['csv_escaped' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->csv_escaped);
$this->assertSame($expected, $importArray['csv_escaped']);
self::assertSame($expected, $import->csv_escaped);
self::assertSame($expected, $importArray['csv_escaped']);
}
/** @return iterable<string, array{mixed, string}> */
@ -218,8 +218,8 @@ class ImportTest extends TestCase
{
$import = new Import(['csv_new_line' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->csv_new_line);
$this->assertSame($expected, $importArray['csv_new_line']);
self::assertSame($expected, $import->csv_new_line);
self::assertSame($expected, $importArray['csv_new_line']);
}
/** @return iterable<string, array{mixed, string}> */
@ -236,8 +236,8 @@ class ImportTest extends TestCase
{
$import = new Import(['csv_columns' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->csv_columns);
$this->assertSame($expected, $importArray['csv_columns']);
self::assertSame($expected, $import->csv_columns);
self::assertSame($expected, $importArray['csv_columns']);
}
/** @return iterable<string, array{mixed, string}> */
@ -254,8 +254,8 @@ class ImportTest extends TestCase
{
$import = new Import(['csv_col_names' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->csv_col_names);
$this->assertSame($expected, $importArray['csv_col_names']);
self::assertSame($expected, $import->csv_col_names);
self::assertSame($expected, $importArray['csv_col_names']);
}
#[DataProvider('booleanWithDefaultFalseProvider')]
@ -263,8 +263,8 @@ class ImportTest extends TestCase
{
$import = new Import(['ldi_replace' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->ldi_replace);
$this->assertSame($expected, $importArray['ldi_replace']);
self::assertSame($expected, $import->ldi_replace);
self::assertSame($expected, $importArray['ldi_replace']);
}
#[DataProvider('booleanWithDefaultFalseProvider')]
@ -272,8 +272,8 @@ class ImportTest extends TestCase
{
$import = new Import(['ldi_ignore' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->ldi_ignore);
$this->assertSame($expected, $importArray['ldi_ignore']);
self::assertSame($expected, $import->ldi_ignore);
self::assertSame($expected, $importArray['ldi_ignore']);
}
#[DataProvider('valuesForLdiTerminatedProvider')]
@ -281,8 +281,8 @@ class ImportTest extends TestCase
{
$import = new Import(['ldi_terminated' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->ldi_terminated);
$this->assertSame($expected, $importArray['ldi_terminated']);
self::assertSame($expected, $import->ldi_terminated);
self::assertSame($expected, $importArray['ldi_terminated']);
}
/** @return iterable<string, array{mixed, string}> */
@ -299,8 +299,8 @@ class ImportTest extends TestCase
{
$import = new Import(['ldi_enclosed' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->ldi_enclosed);
$this->assertSame($expected, $importArray['ldi_enclosed']);
self::assertSame($expected, $import->ldi_enclosed);
self::assertSame($expected, $importArray['ldi_enclosed']);
}
/** @return iterable<string, array{mixed, string}> */
@ -317,8 +317,8 @@ class ImportTest extends TestCase
{
$import = new Import(['ldi_escaped' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->ldi_escaped);
$this->assertSame($expected, $importArray['ldi_escaped']);
self::assertSame($expected, $import->ldi_escaped);
self::assertSame($expected, $importArray['ldi_escaped']);
}
/** @return iterable<string, array{mixed, string}> */
@ -335,8 +335,8 @@ class ImportTest extends TestCase
{
$import = new Import(['ldi_new_line' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->ldi_new_line);
$this->assertSame($expected, $importArray['ldi_new_line']);
self::assertSame($expected, $import->ldi_new_line);
self::assertSame($expected, $importArray['ldi_new_line']);
}
/** @return iterable<string, array{mixed, string}> */
@ -353,8 +353,8 @@ class ImportTest extends TestCase
{
$import = new Import(['ldi_columns' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->ldi_columns);
$this->assertSame($expected, $importArray['ldi_columns']);
self::assertSame($expected, $import->ldi_columns);
self::assertSame($expected, $importArray['ldi_columns']);
}
/** @return iterable<string, array{mixed, string}> */
@ -371,8 +371,8 @@ class ImportTest extends TestCase
{
$import = new Import(['ldi_local_option' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->ldi_local_option);
$this->assertSame($expected, $importArray['ldi_local_option']);
self::assertSame($expected, $import->ldi_local_option);
self::assertSame($expected, $importArray['ldi_local_option']);
}
/** @return iterable<string, array{mixed, string|bool}> */
@ -390,8 +390,8 @@ class ImportTest extends TestCase
{
$import = new Import(['ods_col_names' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->ods_col_names);
$this->assertSame($expected, $importArray['ods_col_names']);
self::assertSame($expected, $import->ods_col_names);
self::assertSame($expected, $importArray['ods_col_names']);
}
#[DataProvider('booleanWithDefaultTrueProvider')]
@ -399,8 +399,8 @@ class ImportTest extends TestCase
{
$import = new Import(['ods_empty_rows' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->ods_empty_rows);
$this->assertSame($expected, $importArray['ods_empty_rows']);
self::assertSame($expected, $import->ods_empty_rows);
self::assertSame($expected, $importArray['ods_empty_rows']);
}
#[DataProvider('booleanWithDefaultTrueProvider')]
@ -408,8 +408,8 @@ class ImportTest extends TestCase
{
$import = new Import(['ods_recognize_percentages' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->ods_recognize_percentages);
$this->assertSame($expected, $importArray['ods_recognize_percentages']);
self::assertSame($expected, $import->ods_recognize_percentages);
self::assertSame($expected, $importArray['ods_recognize_percentages']);
}
#[DataProvider('booleanWithDefaultTrueProvider')]
@ -417,7 +417,7 @@ class ImportTest extends TestCase
{
$import = new Import(['ods_recognize_currency' => $actual]);
$importArray = $import->asArray();
$this->assertSame($expected, $import->ods_recognize_currency);
$this->assertSame($expected, $importArray['ods_recognize_currency']);
self::assertSame($expected, $import->ods_recognize_currency);
self::assertSame($expected, $importArray['ods_recognize_currency']);
}
}

View File

@ -59,9 +59,9 @@ class SchemaTest extends TestCase
$schemaArray = $settings->asArray();
foreach (array_keys($expectedValues) as $key) {
$this->assertSame($expected[$key], $settings->$key);
$this->assertArrayHasKey($key, $schemaArray);
$this->assertSame($expected[$key], $schemaArray[$key]);
self::assertSame($expected[$key], $settings->$key);
self::assertArrayHasKey($key, $schemaArray);
self::assertSame($expected[$key], $schemaArray[$key]);
}
}

View File

@ -17,8 +17,8 @@ class ServerTest extends TestCase
{
$server = new Server(['host' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->host);
$this->assertSame($expected, $serverArray['host']);
self::assertSame($expected, $server->host);
self::assertSame($expected, $serverArray['host']);
}
/** @return iterable<string, array{mixed, string}> */
@ -35,8 +35,8 @@ class ServerTest extends TestCase
{
$server = new Server(['port' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->port);
$this->assertSame($expected, $serverArray['port']);
self::assertSame($expected, $server->port);
self::assertSame($expected, $serverArray['port']);
}
/** @return iterable<string, array{mixed, string}> */
@ -53,8 +53,8 @@ class ServerTest extends TestCase
{
$server = new Server(['socket' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->socket);
$this->assertSame($expected, $serverArray['socket']);
self::assertSame($expected, $server->socket);
self::assertSame($expected, $serverArray['socket']);
}
/** @return iterable<string, array{mixed, string}> */
@ -71,8 +71,8 @@ class ServerTest extends TestCase
{
$server = new Server(['ssl' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->ssl);
$this->assertSame($expected, $serverArray['ssl']);
self::assertSame($expected, $server->ssl);
self::assertSame($expected, $serverArray['ssl']);
}
/** @return iterable<string, array{mixed, bool}> */
@ -89,8 +89,8 @@ class ServerTest extends TestCase
{
$server = new Server(['ssl_key' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->sslKey);
$this->assertSame($expected, $serverArray['ssl_key']);
self::assertSame($expected, $server->sslKey);
self::assertSame($expected, $serverArray['ssl_key']);
}
/** @return iterable<string, array{mixed, string|null}> */
@ -107,8 +107,8 @@ class ServerTest extends TestCase
{
$server = new Server(['ssl_cert' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->sslCert);
$this->assertSame($expected, $serverArray['ssl_cert']);
self::assertSame($expected, $server->sslCert);
self::assertSame($expected, $serverArray['ssl_cert']);
}
#[DataProvider('valuesForSslOptionsProvider')]
@ -116,8 +116,8 @@ class ServerTest extends TestCase
{
$server = new Server(['ssl_ca' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->sslCa);
$this->assertSame($expected, $serverArray['ssl_ca']);
self::assertSame($expected, $server->sslCa);
self::assertSame($expected, $serverArray['ssl_ca']);
}
#[DataProvider('valuesForSslOptionsProvider')]
@ -125,8 +125,8 @@ class ServerTest extends TestCase
{
$server = new Server(['ssl_ca_path' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->sslCaPath);
$this->assertSame($expected, $serverArray['ssl_ca_path']);
self::assertSame($expected, $server->sslCaPath);
self::assertSame($expected, $serverArray['ssl_ca_path']);
}
#[DataProvider('valuesForSslOptionsProvider')]
@ -134,8 +134,8 @@ class ServerTest extends TestCase
{
$server = new Server(['ssl_ciphers' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->sslCiphers);
$this->assertSame($expected, $serverArray['ssl_ciphers']);
self::assertSame($expected, $server->sslCiphers);
self::assertSame($expected, $serverArray['ssl_ciphers']);
}
#[DataProvider('booleanWithDefaultTrueProvider')]
@ -143,8 +143,8 @@ class ServerTest extends TestCase
{
$server = new Server(['ssl_verify' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->sslVerify);
$this->assertSame($expected, $serverArray['ssl_verify']);
self::assertSame($expected, $server->sslVerify);
self::assertSame($expected, $serverArray['ssl_verify']);
}
/** @return iterable<string, array{mixed, bool}> */
@ -161,8 +161,8 @@ class ServerTest extends TestCase
{
$server = new Server(['compress' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->compress);
$this->assertSame($expected, $serverArray['compress']);
self::assertSame($expected, $server->compress);
self::assertSame($expected, $serverArray['compress']);
}
#[DataProvider('valuesForControlHostProvider')]
@ -170,8 +170,8 @@ class ServerTest extends TestCase
{
$server = new Server(['controlhost' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlHost);
$this->assertSame($expected, $serverArray['controlhost']);
self::assertSame($expected, $server->controlHost);
self::assertSame($expected, $serverArray['controlhost']);
}
#[DataProvider('valuesForControlHostProvider')]
@ -179,8 +179,8 @@ class ServerTest extends TestCase
{
$server = new Server(['control_host' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlHost);
$this->assertSame($expected, $serverArray['controlhost']);
self::assertSame($expected, $server->controlHost);
self::assertSame($expected, $serverArray['controlhost']);
}
/** @return iterable<string, array{mixed, string}> */
@ -197,8 +197,8 @@ class ServerTest extends TestCase
{
$server = new Server(['controlport' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlPort);
$this->assertSame($expected, $serverArray['controlport']);
self::assertSame($expected, $server->controlPort);
self::assertSame($expected, $serverArray['controlport']);
}
#[DataProvider('valuesForControlPortProvider')]
@ -206,8 +206,8 @@ class ServerTest extends TestCase
{
$server = new Server(['control_port' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlPort);
$this->assertSame($expected, $serverArray['controlport']);
self::assertSame($expected, $server->controlPort);
self::assertSame($expected, $serverArray['controlport']);
}
/** @return iterable<string, array{mixed, string}> */
@ -224,8 +224,8 @@ class ServerTest extends TestCase
{
$server = new Server(['controluser' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlUser);
$this->assertSame($expected, $serverArray['controluser']);
self::assertSame($expected, $server->controlUser);
self::assertSame($expected, $serverArray['controluser']);
}
#[DataProvider('valuesForControlUserProvider')]
@ -233,8 +233,8 @@ class ServerTest extends TestCase
{
$server = new Server(['control_user' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlUser);
$this->assertSame($expected, $serverArray['controluser']);
self::assertSame($expected, $server->controlUser);
self::assertSame($expected, $serverArray['controluser']);
}
/** @return iterable<string, array{mixed, string}> */
@ -251,8 +251,8 @@ class ServerTest extends TestCase
{
$server = new Server(['controlpass' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlPass);
$this->assertSame($expected, $serverArray['controlpass']);
self::assertSame($expected, $server->controlPass);
self::assertSame($expected, $serverArray['controlpass']);
}
#[DataProvider('valuesForControlPassProvider')]
@ -260,8 +260,8 @@ class ServerTest extends TestCase
{
$server = new Server(['control_pass' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlPass);
$this->assertSame($expected, $serverArray['controlpass']);
self::assertSame($expected, $server->controlPass);
self::assertSame($expected, $serverArray['controlpass']);
}
#[DataProvider('valuesForControlPassProvider')]
@ -269,8 +269,8 @@ class ServerTest extends TestCase
{
$server = new Server(['control_password' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlPass);
$this->assertSame($expected, $serverArray['controlpass']);
self::assertSame($expected, $server->controlPass);
self::assertSame($expected, $serverArray['controlpass']);
}
/** @return iterable<string, array{mixed, string}> */
@ -287,8 +287,8 @@ class ServerTest extends TestCase
{
$server = new Server(['control_socket' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlSocket);
$this->assertSame($expected, $serverArray['control_socket']);
self::assertSame($expected, $server->controlSocket);
self::assertSame($expected, $serverArray['control_socket']);
}
/** @return iterable<string, array{mixed, string|null}> */
@ -305,8 +305,8 @@ class ServerTest extends TestCase
{
$server = new Server(['control_ssl' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlSsl);
$this->assertSame($expected, $serverArray['control_ssl']);
self::assertSame($expected, $server->controlSsl);
self::assertSame($expected, $serverArray['control_ssl']);
}
/** @return iterable<string, array{mixed, bool|null}> */
@ -323,8 +323,8 @@ class ServerTest extends TestCase
{
$server = new Server(['control_ssl_key' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlSslKey);
$this->assertSame($expected, $serverArray['control_ssl_key']);
self::assertSame($expected, $server->controlSslKey);
self::assertSame($expected, $serverArray['control_ssl_key']);
}
#[DataProvider('valuesForSslOptionsProvider')]
@ -332,8 +332,8 @@ class ServerTest extends TestCase
{
$server = new Server(['control_ssl_cert' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlSslCert);
$this->assertSame($expected, $serverArray['control_ssl_cert']);
self::assertSame($expected, $server->controlSslCert);
self::assertSame($expected, $serverArray['control_ssl_cert']);
}
#[DataProvider('valuesForSslOptionsProvider')]
@ -341,8 +341,8 @@ class ServerTest extends TestCase
{
$server = new Server(['control_ssl_ca' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlSslCa);
$this->assertSame($expected, $serverArray['control_ssl_ca']);
self::assertSame($expected, $server->controlSslCa);
self::assertSame($expected, $serverArray['control_ssl_ca']);
}
#[DataProvider('valuesForSslOptionsProvider')]
@ -350,8 +350,8 @@ class ServerTest extends TestCase
{
$server = new Server(['control_ssl_ca_path' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlSslCaPath);
$this->assertSame($expected, $serverArray['control_ssl_ca_path']);
self::assertSame($expected, $server->controlSslCaPath);
self::assertSame($expected, $serverArray['control_ssl_ca_path']);
}
#[DataProvider('valuesForSslOptionsProvider')]
@ -359,8 +359,8 @@ class ServerTest extends TestCase
{
$server = new Server(['control_ssl_ciphers' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlSslCiphers);
$this->assertSame($expected, $serverArray['control_ssl_ciphers']);
self::assertSame($expected, $server->controlSslCiphers);
self::assertSame($expected, $serverArray['control_ssl_ciphers']);
}
#[DataProvider('valuesForControlSslVerifyProvider')]
@ -368,8 +368,8 @@ class ServerTest extends TestCase
{
$server = new Server(['control_ssl_verify' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlSslVerify);
$this->assertSame($expected, $serverArray['control_ssl_verify']);
self::assertSame($expected, $server->controlSslVerify);
self::assertSame($expected, $serverArray['control_ssl_verify']);
}
/** @return iterable<string, array{mixed, bool|null}> */
@ -386,8 +386,8 @@ class ServerTest extends TestCase
{
$server = new Server(['control_compress' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlCompress);
$this->assertSame($expected, $serverArray['control_compress']);
self::assertSame($expected, $server->controlCompress);
self::assertSame($expected, $serverArray['control_compress']);
}
/** @return iterable<string, array{mixed, bool|null}> */
@ -404,8 +404,8 @@ class ServerTest extends TestCase
{
$server = new Server(['control_hide_connection_errors' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->controlHideConnectionErrors);
$this->assertSame($expected, $serverArray['control_hide_connection_errors']);
self::assertSame($expected, $server->controlHideConnectionErrors);
self::assertSame($expected, $serverArray['control_hide_connection_errors']);
}
/** @return iterable<string, array{mixed, bool|null}> */
@ -422,8 +422,8 @@ class ServerTest extends TestCase
{
$server = new Server(['auth_type' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->authType);
$this->assertSame($expected, $serverArray['auth_type']);
self::assertSame($expected, $server->authType);
self::assertSame($expected, $serverArray['auth_type']);
}
/** @return iterable<string, array{mixed, string}> */
@ -442,8 +442,8 @@ class ServerTest extends TestCase
{
$server = new Server(['auth_http_realm' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->authHttpRealm);
$this->assertSame($expected, $serverArray['auth_http_realm']);
self::assertSame($expected, $server->authHttpRealm);
self::assertSame($expected, $serverArray['auth_http_realm']);
}
/** @return iterable<string, array{mixed, string}> */
@ -460,8 +460,8 @@ class ServerTest extends TestCase
{
$server = new Server(['user' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->user);
$this->assertSame($expected, $serverArray['user']);
self::assertSame($expected, $server->user);
self::assertSame($expected, $serverArray['user']);
}
/** @return iterable<string, array{mixed, string}> */
@ -478,8 +478,8 @@ class ServerTest extends TestCase
{
$server = new Server(['password' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->password);
$this->assertSame($expected, $serverArray['password']);
self::assertSame($expected, $server->password);
self::assertSame($expected, $serverArray['password']);
}
/** @return iterable<string, array{mixed, string}> */
@ -496,8 +496,8 @@ class ServerTest extends TestCase
{
$server = new Server(['SignonSession' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->signonSession);
$this->assertSame($expected, $serverArray['SignonSession']);
self::assertSame($expected, $server->signonSession);
self::assertSame($expected, $serverArray['SignonSession']);
}
/** @return iterable<string, array{mixed, string}> */
@ -515,8 +515,8 @@ class ServerTest extends TestCase
{
$server = new Server(['SignonCookieParams' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->signonCookieParams);
$this->assertSame($expected, $serverArray['SignonCookieParams']);
self::assertSame($expected, $server->signonCookieParams);
self::assertSame($expected, $serverArray['SignonCookieParams']);
}
/** @return iterable<string, array{mixed, array<string, int|string|bool>}> */
@ -584,8 +584,8 @@ class ServerTest extends TestCase
{
$server = new Server(['SignonScript' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->signonScript);
$this->assertSame($expected, $serverArray['SignonScript']);
self::assertSame($expected, $server->signonScript);
self::assertSame($expected, $serverArray['SignonScript']);
}
/** @return iterable<string, array{mixed, string}> */
@ -602,8 +602,8 @@ class ServerTest extends TestCase
{
$server = new Server(['SignonURL' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->signonUrl);
$this->assertSame($expected, $serverArray['SignonURL']);
self::assertSame($expected, $server->signonUrl);
self::assertSame($expected, $serverArray['SignonURL']);
}
/** @return iterable<string, array{mixed, string}> */
@ -620,8 +620,8 @@ class ServerTest extends TestCase
{
$server = new Server(['LogoutURL' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->logoutUrl);
$this->assertSame($expected, $serverArray['LogoutURL']);
self::assertSame($expected, $server->logoutUrl);
self::assertSame($expected, $serverArray['LogoutURL']);
}
/** @return iterable<string, array{mixed, string}> */
@ -639,8 +639,8 @@ class ServerTest extends TestCase
{
$server = new Server(['only_db' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->onlyDb);
$this->assertSame($expected, $serverArray['only_db']);
self::assertSame($expected, $server->onlyDb);
self::assertSame($expected, $serverArray['only_db']);
}
/** @return iterable<string, array{mixed, string|string[]}> */
@ -658,8 +658,8 @@ class ServerTest extends TestCase
{
$server = new Server(['hide_db' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->hideDb);
$this->assertSame($expected, $serverArray['hide_db']);
self::assertSame($expected, $server->hideDb);
self::assertSame($expected, $serverArray['hide_db']);
}
/** @return iterable<string, array{mixed, string}> */
@ -676,8 +676,8 @@ class ServerTest extends TestCase
{
$server = new Server(['verbose' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->verbose);
$this->assertSame($expected, $serverArray['verbose']);
self::assertSame($expected, $server->verbose);
self::assertSame($expected, $serverArray['verbose']);
}
/** @return iterable<string, array{mixed, string}> */
@ -694,8 +694,8 @@ class ServerTest extends TestCase
{
$server = new Server(['pmadb' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->pmaDb);
$this->assertSame($expected, $serverArray['pmadb']);
self::assertSame($expected, $server->pmaDb);
self::assertSame($expected, $serverArray['pmadb']);
}
/** @return iterable<string, array{mixed, string}> */
@ -712,8 +712,8 @@ class ServerTest extends TestCase
{
$server = new Server(['bookmarktable' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->bookmarkTable);
$this->assertSame($expected, $serverArray['bookmarktable']);
self::assertSame($expected, $server->bookmarkTable);
self::assertSame($expected, $serverArray['bookmarktable']);
}
/** @return iterable<string, array{mixed, string|false}> */
@ -731,8 +731,8 @@ class ServerTest extends TestCase
{
$server = new Server(['relation' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->relation);
$this->assertSame($expected, $serverArray['relation']);
self::assertSame($expected, $server->relation);
self::assertSame($expected, $serverArray['relation']);
}
#[DataProvider('valuesForConfigStorageTablesProvider')]
@ -740,8 +740,8 @@ class ServerTest extends TestCase
{
$server = new Server(['table_info' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->tableInfo);
$this->assertSame($expected, $serverArray['table_info']);
self::assertSame($expected, $server->tableInfo);
self::assertSame($expected, $serverArray['table_info']);
}
#[DataProvider('valuesForConfigStorageTablesProvider')]
@ -749,8 +749,8 @@ class ServerTest extends TestCase
{
$server = new Server(['pdf_pages' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->pdfPages);
$this->assertSame($expected, $serverArray['pdf_pages']);
self::assertSame($expected, $server->pdfPages);
self::assertSame($expected, $serverArray['pdf_pages']);
}
#[DataProvider('valuesForConfigStorageTablesProvider')]
@ -758,8 +758,8 @@ class ServerTest extends TestCase
{
$server = new Server(['column_info' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->columnInfo);
$this->assertSame($expected, $serverArray['column_info']);
self::assertSame($expected, $server->columnInfo);
self::assertSame($expected, $serverArray['column_info']);
}
#[DataProvider('valuesForConfigStorageTablesProvider')]
@ -767,8 +767,8 @@ class ServerTest extends TestCase
{
$server = new Server(['history' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->history);
$this->assertSame($expected, $serverArray['history']);
self::assertSame($expected, $server->history);
self::assertSame($expected, $serverArray['history']);
}
#[DataProvider('valuesForConfigStorageTablesProvider')]
@ -776,8 +776,8 @@ class ServerTest extends TestCase
{
$server = new Server(['recent' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->recent);
$this->assertSame($expected, $serverArray['recent']);
self::assertSame($expected, $server->recent);
self::assertSame($expected, $serverArray['recent']);
}
#[DataProvider('valuesForConfigStorageTablesProvider')]
@ -785,8 +785,8 @@ class ServerTest extends TestCase
{
$server = new Server(['favorite' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->favorite);
$this->assertSame($expected, $serverArray['favorite']);
self::assertSame($expected, $server->favorite);
self::assertSame($expected, $serverArray['favorite']);
}
#[DataProvider('valuesForConfigStorageTablesProvider')]
@ -794,8 +794,8 @@ class ServerTest extends TestCase
{
$server = new Server(['table_uiprefs' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->tableUiPrefs);
$this->assertSame($expected, $serverArray['table_uiprefs']);
self::assertSame($expected, $server->tableUiPrefs);
self::assertSame($expected, $serverArray['table_uiprefs']);
}
#[DataProvider('valuesForConfigStorageTablesProvider')]
@ -803,8 +803,8 @@ class ServerTest extends TestCase
{
$server = new Server(['tracking' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->tracking);
$this->assertSame($expected, $serverArray['tracking']);
self::assertSame($expected, $server->tracking);
self::assertSame($expected, $serverArray['tracking']);
}
#[DataProvider('valuesForConfigStorageTablesProvider')]
@ -812,8 +812,8 @@ class ServerTest extends TestCase
{
$server = new Server(['userconfig' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->userConfig);
$this->assertSame($expected, $serverArray['userconfig']);
self::assertSame($expected, $server->userConfig);
self::assertSame($expected, $serverArray['userconfig']);
}
#[DataProvider('valuesForConfigStorageTablesProvider')]
@ -821,8 +821,8 @@ class ServerTest extends TestCase
{
$server = new Server(['users' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->users);
$this->assertSame($expected, $serverArray['users']);
self::assertSame($expected, $server->users);
self::assertSame($expected, $serverArray['users']);
}
#[DataProvider('valuesForConfigStorageTablesProvider')]
@ -830,8 +830,8 @@ class ServerTest extends TestCase
{
$server = new Server(['usergroups' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->userGroups);
$this->assertSame($expected, $serverArray['usergroups']);
self::assertSame($expected, $server->userGroups);
self::assertSame($expected, $serverArray['usergroups']);
}
#[DataProvider('valuesForConfigStorageTablesProvider')]
@ -839,8 +839,8 @@ class ServerTest extends TestCase
{
$server = new Server(['navigationhiding' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->navigationHiding);
$this->assertSame($expected, $serverArray['navigationhiding']);
self::assertSame($expected, $server->navigationHiding);
self::assertSame($expected, $serverArray['navigationhiding']);
}
#[DataProvider('valuesForConfigStorageTablesProvider')]
@ -848,8 +848,8 @@ class ServerTest extends TestCase
{
$server = new Server(['savedsearches' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->savedSearches);
$this->assertSame($expected, $serverArray['savedsearches']);
self::assertSame($expected, $server->savedSearches);
self::assertSame($expected, $serverArray['savedsearches']);
}
#[DataProvider('valuesForConfigStorageTablesProvider')]
@ -857,8 +857,8 @@ class ServerTest extends TestCase
{
$server = new Server(['central_columns' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->centralColumns);
$this->assertSame($expected, $serverArray['central_columns']);
self::assertSame($expected, $server->centralColumns);
self::assertSame($expected, $serverArray['central_columns']);
}
#[DataProvider('valuesForConfigStorageTablesProvider')]
@ -866,8 +866,8 @@ class ServerTest extends TestCase
{
$server = new Server(['designer_settings' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->designerSettings);
$this->assertSame($expected, $serverArray['designer_settings']);
self::assertSame($expected, $server->designerSettings);
self::assertSame($expected, $serverArray['designer_settings']);
}
#[DataProvider('valuesForConfigStorageTablesProvider')]
@ -875,8 +875,8 @@ class ServerTest extends TestCase
{
$server = new Server(['export_templates' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->exportTemplates);
$this->assertSame($expected, $serverArray['export_templates']);
self::assertSame($expected, $server->exportTemplates);
self::assertSame($expected, $serverArray['export_templates']);
}
#[DataProvider('valuesForMaxTableUiPrefsProvider')]
@ -884,8 +884,8 @@ class ServerTest extends TestCase
{
$server = new Server(['MaxTableUiprefs' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->maxTableUiPrefs);
$this->assertSame($expected, $serverArray['MaxTableUiprefs']);
self::assertSame($expected, $server->maxTableUiPrefs);
self::assertSame($expected, $serverArray['MaxTableUiprefs']);
}
/** @return iterable<string, array{mixed, int}> */
@ -903,8 +903,8 @@ class ServerTest extends TestCase
{
$server = new Server(['SessionTimeZone' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->sessionTimeZone);
$this->assertSame($expected, $serverArray['SessionTimeZone']);
self::assertSame($expected, $server->sessionTimeZone);
self::assertSame($expected, $serverArray['SessionTimeZone']);
}
/** @return iterable<string, array{mixed, string}> */
@ -921,8 +921,8 @@ class ServerTest extends TestCase
{
$server = new Server(['AllowRoot' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->allowRoot);
$this->assertSame($expected, $serverArray['AllowRoot']);
self::assertSame($expected, $server->allowRoot);
self::assertSame($expected, $serverArray['AllowRoot']);
}
#[DataProvider('booleanWithDefaultFalseProvider')]
@ -930,8 +930,8 @@ class ServerTest extends TestCase
{
$server = new Server(['AllowNoPassword' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->allowNoPassword);
$this->assertSame($expected, $serverArray['AllowNoPassword']);
self::assertSame($expected, $server->allowNoPassword);
self::assertSame($expected, $serverArray['AllowNoPassword']);
}
/** @param array<string, string|string[]> $expected */
@ -940,8 +940,8 @@ class ServerTest extends TestCase
{
$server = new Server(['AllowDeny' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->allowDeny);
$this->assertSame($expected, $serverArray['AllowDeny']);
self::assertSame($expected, $server->allowDeny);
self::assertSame($expected, $serverArray['AllowDeny']);
}
/** @return iterable<string, array{mixed, array<string, string|string[]>}> */
@ -970,8 +970,8 @@ class ServerTest extends TestCase
{
$server = new Server(['DisableIS' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->disableIS);
$this->assertSame($expected, $serverArray['DisableIS']);
self::assertSame($expected, $server->disableIS);
self::assertSame($expected, $serverArray['DisableIS']);
}
#[DataProvider('booleanWithDefaultFalseProvider')]
@ -979,8 +979,8 @@ class ServerTest extends TestCase
{
$server = new Server(['tracking_version_auto_create' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->trackingVersionAutoCreate);
$this->assertSame($expected, $serverArray['tracking_version_auto_create']);
self::assertSame($expected, $server->trackingVersionAutoCreate);
self::assertSame($expected, $serverArray['tracking_version_auto_create']);
}
#[DataProvider('valuesForTrackingDefaultStatementsProvider')]
@ -988,8 +988,8 @@ class ServerTest extends TestCase
{
$server = new Server(['tracking_default_statements' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->trackingDefaultStatements);
$this->assertSame($expected, $serverArray['tracking_default_statements']);
self::assertSame($expected, $server->trackingDefaultStatements);
self::assertSame($expected, $serverArray['tracking_default_statements']);
}
/** @return iterable<string, array{mixed, string}> */
@ -1011,8 +1011,8 @@ class ServerTest extends TestCase
{
$server = new Server(['tracking_add_drop_view' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->trackingAddDropView);
$this->assertSame($expected, $serverArray['tracking_add_drop_view']);
self::assertSame($expected, $server->trackingAddDropView);
self::assertSame($expected, $serverArray['tracking_add_drop_view']);
}
#[DataProvider('booleanWithDefaultTrueProvider')]
@ -1020,8 +1020,8 @@ class ServerTest extends TestCase
{
$server = new Server(['tracking_add_drop_table' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->trackingAddDropTable);
$this->assertSame($expected, $serverArray['tracking_add_drop_table']);
self::assertSame($expected, $server->trackingAddDropTable);
self::assertSame($expected, $serverArray['tracking_add_drop_table']);
}
#[DataProvider('booleanWithDefaultTrueProvider')]
@ -1029,8 +1029,8 @@ class ServerTest extends TestCase
{
$server = new Server(['tracking_add_drop_database' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->trackingAddDropDatabase);
$this->assertSame($expected, $serverArray['tracking_add_drop_database']);
self::assertSame($expected, $server->trackingAddDropDatabase);
self::assertSame($expected, $serverArray['tracking_add_drop_database']);
}
#[DataProvider('booleanWithDefaultFalseProvider')]
@ -1038,7 +1038,7 @@ class ServerTest extends TestCase
{
$server = new Server(['hide_connection_errors' => $actual]);
$serverArray = $server->asArray();
$this->assertSame($expected, $server->hideConnectionErrors);
$this->assertSame($expected, $serverArray['hide_connection_errors']);
self::assertSame($expected, $server->hideConnectionErrors);
self::assertSame($expected, $serverArray['hide_connection_errors']);
}
}

View File

@ -18,8 +18,8 @@ class SqlQueryBoxTest extends TestCase
$sqlQueryBox = new SqlQueryBox(['Edit' => $actual]);
$sqlQueryBoxArray = $sqlQueryBox->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $sqlQueryBox->Edit);
$this->assertSame($expected, $sqlQueryBoxArray['Edit']);
self::assertSame($expected, $sqlQueryBox->Edit);
self::assertSame($expected, $sqlQueryBoxArray['Edit']);
}
#[DataProvider('booleanWithDefaultTrueProvider')]
@ -28,8 +28,8 @@ class SqlQueryBoxTest extends TestCase
$sqlQueryBox = new SqlQueryBox(['Explain' => $actual]);
$sqlQueryBoxArray = $sqlQueryBox->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $sqlQueryBox->Explain);
$this->assertSame($expected, $sqlQueryBoxArray['Explain']);
self::assertSame($expected, $sqlQueryBox->Explain);
self::assertSame($expected, $sqlQueryBoxArray['Explain']);
}
#[DataProvider('booleanWithDefaultTrueProvider')]
@ -38,8 +38,8 @@ class SqlQueryBoxTest extends TestCase
$sqlQueryBox = new SqlQueryBox(['ShowAsPHP' => $actual]);
$sqlQueryBoxArray = $sqlQueryBox->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $sqlQueryBox->ShowAsPHP);
$this->assertSame($expected, $sqlQueryBoxArray['ShowAsPHP']);
self::assertSame($expected, $sqlQueryBox->ShowAsPHP);
self::assertSame($expected, $sqlQueryBoxArray['ShowAsPHP']);
}
#[DataProvider('booleanWithDefaultTrueProvider')]
@ -48,8 +48,8 @@ class SqlQueryBoxTest extends TestCase
$sqlQueryBox = new SqlQueryBox(['Refresh' => $actual]);
$sqlQueryBoxArray = $sqlQueryBox->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $sqlQueryBox->Refresh);
$this->assertSame($expected, $sqlQueryBoxArray['Refresh']);
self::assertSame($expected, $sqlQueryBox->Refresh);
self::assertSame($expected, $sqlQueryBoxArray['Refresh']);
}
/** @return iterable<string, array{mixed, bool}> */

View File

@ -19,8 +19,8 @@ class TransformationsTest extends TestCase
$transformations = new Transformations(['Substring' => $actual]);
$transformationsArray = $transformations->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $transformations->Substring);
$this->assertSame($expected, $transformationsArray['Substring']);
self::assertSame($expected, $transformations->Substring);
self::assertSame($expected, $transformationsArray['Substring']);
}
/** @return iterable<string, array{mixed, array<int, int|string>}> */
@ -44,8 +44,8 @@ class TransformationsTest extends TestCase
$transformations = new Transformations(['Bool2Text' => $actual]);
$transformationsArray = $transformations->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $transformations->Bool2Text);
$this->assertSame($expected, $transformationsArray['Bool2Text']);
self::assertSame($expected, $transformations->Bool2Text);
self::assertSame($expected, $transformationsArray['Bool2Text']);
}
/** @return iterable<string, array{mixed, array<int, string>}> */
@ -67,8 +67,8 @@ class TransformationsTest extends TestCase
$transformations = new Transformations(['External' => $actual]);
$transformationsArray = $transformations->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $transformations->External);
$this->assertSame($expected, $transformationsArray['External']);
self::assertSame($expected, $transformations->External);
self::assertSame($expected, $transformationsArray['External']);
}
/** @return iterable<string, array{mixed, array<int, int|string>}> */
@ -93,8 +93,8 @@ class TransformationsTest extends TestCase
$transformations = new Transformations(['PreApPend' => $actual]);
$transformationsArray = $transformations->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $transformations->PreApPend);
$this->assertSame($expected, $transformationsArray['PreApPend']);
self::assertSame($expected, $transformations->PreApPend);
self::assertSame($expected, $transformationsArray['PreApPend']);
}
/** @return iterable<string, array{mixed, array<int, string>}> */
@ -116,8 +116,8 @@ class TransformationsTest extends TestCase
$transformations = new Transformations(['Hex' => $actual]);
$transformationsArray = $transformations->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $transformations->Hex);
$this->assertSame($expected, $transformationsArray['Hex']);
self::assertSame($expected, $transformations->Hex);
self::assertSame($expected, $transformationsArray['Hex']);
}
/** @return iterable<string, array{mixed, array<int, int>}> */
@ -138,8 +138,8 @@ class TransformationsTest extends TestCase
$transformations = new Transformations(['DateFormat' => $actual]);
$transformationsArray = $transformations->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $transformations->DateFormat);
$this->assertSame($expected, $transformationsArray['DateFormat']);
self::assertSame($expected, $transformations->DateFormat);
self::assertSame($expected, $transformationsArray['DateFormat']);
}
/** @return iterable<string, array{mixed, array<int, int|string>}> */
@ -163,8 +163,8 @@ class TransformationsTest extends TestCase
$transformations = new Transformations(['Inline' => $actual]);
$transformationsArray = $transformations->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $transformations->Inline);
$this->assertSame($expected, $transformationsArray['Inline']);
self::assertSame($expected, $transformations->Inline);
self::assertSame($expected, $transformationsArray['Inline']);
}
/** @return iterable<string, array{mixed, array<int|string, int|string|array<string, string>|null>}> */
@ -195,8 +195,8 @@ class TransformationsTest extends TestCase
$transformations = new Transformations(['TextImageLink' => $actual]);
$transformationsArray = $transformations->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $transformations->TextImageLink);
$this->assertSame($expected, $transformationsArray['TextImageLink']);
self::assertSame($expected, $transformations->TextImageLink);
self::assertSame($expected, $transformationsArray['TextImageLink']);
}
/** @return iterable<string, array{mixed, array<int, int|string|null>}> */
@ -220,8 +220,8 @@ class TransformationsTest extends TestCase
$transformations = new Transformations(['TextLink' => $actual]);
$transformationsArray = $transformations->asArray();
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->assertSame($expected, $transformations->TextLink);
$this->assertSame($expected, $transformationsArray['TextLink']);
self::assertSame($expected, $transformations->TextLink);
self::assertSame($expected, $transformationsArray['TextLink']);
}
/** @return iterable<string, array{mixed, array<int, string|bool|null>}> */

View File

@ -264,43 +264,43 @@ class SettingsTest extends TestCase
$settingsArray = $settings->asArray();
foreach (array_keys($expectedValues) as $key) {
if ($key === 'Console') {
$this->assertInstanceOf(Console::class, $settings->Console);
self::assertInstanceOf(Console::class, $settings->Console);
continue;
}
if ($key === 'DBG') {
$this->assertInstanceOf(Debug::class, $settings->DBG);
self::assertInstanceOf(Debug::class, $settings->DBG);
continue;
}
if ($key === 'Export') {
$this->assertInstanceOf(Export::class, $settings->Export);
self::assertInstanceOf(Export::class, $settings->Export);
continue;
}
if ($key === 'Import') {
$this->assertInstanceOf(Import::class, $settings->Import);
self::assertInstanceOf(Import::class, $settings->Import);
continue;
}
if ($key === 'Schema') {
$this->assertInstanceOf(Schema::class, $settings->Schema);
self::assertInstanceOf(Schema::class, $settings->Schema);
continue;
}
if ($key === 'SQLQuery') {
$this->assertInstanceOf(SqlQueryBox::class, $settings->SQLQuery);
self::assertInstanceOf(SqlQueryBox::class, $settings->SQLQuery);
continue;
}
if ($key === 'DefaultTransformations') {
$this->assertInstanceOf(Transformations::class, $settings->DefaultTransformations);
self::assertInstanceOf(Transformations::class, $settings->DefaultTransformations);
continue;
}
$this->assertSame($expected[$key], $settings->$key);
$this->assertArrayHasKey($key, $settingsArray);
$this->assertSame($expected[$key], $settingsArray[$key]);
self::assertSame($expected[$key], $settings->$key);
self::assertArrayHasKey($key, $settingsArray);
self::assertSame($expected[$key], $settingsArray[$key]);
}
}
@ -994,8 +994,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['PmaAbsoluteUri' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->PmaAbsoluteUri);
$this->assertSame($expected, $settingsArray['PmaAbsoluteUri']);
self::assertSame($expected, $settings->PmaAbsoluteUri);
self::assertSame($expected, $settingsArray['PmaAbsoluteUri']);
}
/** @return iterable<string, array{mixed, string}> */
@ -1012,8 +1012,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['AuthLog' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->authLog);
$this->assertSame($expected, $settingsArray['AuthLog']);
self::assertSame($expected, $settings->authLog);
self::assertSame($expected, $settingsArray['AuthLog']);
}
/** @return iterable<string, array{mixed, string}> */
@ -1030,8 +1030,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['AuthLogSuccess' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->authLogSuccess);
$this->assertSame($expected, $settingsArray['AuthLogSuccess']);
self::assertSame($expected, $settings->authLogSuccess);
self::assertSame($expected, $settingsArray['AuthLogSuccess']);
}
#[DataProvider('booleanWithDefaultFalseProvider')]
@ -1039,8 +1039,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['PmaNoRelation_DisableWarning' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->PmaNoRelation_DisableWarning);
$this->assertSame($expected, $settingsArray['PmaNoRelation_DisableWarning']);
self::assertSame($expected, $settings->PmaNoRelation_DisableWarning);
self::assertSame($expected, $settingsArray['PmaNoRelation_DisableWarning']);
}
#[DataProvider('booleanWithDefaultFalseProvider')]
@ -1048,8 +1048,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['SuhosinDisableWarning' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->SuhosinDisableWarning);
$this->assertSame($expected, $settingsArray['SuhosinDisableWarning']);
self::assertSame($expected, $settings->SuhosinDisableWarning);
self::assertSame($expected, $settingsArray['SuhosinDisableWarning']);
}
#[DataProvider('booleanWithDefaultFalseProvider')]
@ -1057,8 +1057,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['LoginCookieValidityDisableWarning' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->LoginCookieValidityDisableWarning);
$this->assertSame($expected, $settingsArray['LoginCookieValidityDisableWarning']);
self::assertSame($expected, $settings->LoginCookieValidityDisableWarning);
self::assertSame($expected, $settingsArray['LoginCookieValidityDisableWarning']);
}
#[DataProvider('booleanWithDefaultFalseProvider')]
@ -1066,8 +1066,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['ReservedWordDisableWarning' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->ReservedWordDisableWarning);
$this->assertSame($expected, $settingsArray['ReservedWordDisableWarning']);
self::assertSame($expected, $settings->ReservedWordDisableWarning);
self::assertSame($expected, $settingsArray['ReservedWordDisableWarning']);
}
#[DataProvider('valuesForTranslationWarningThresholdProvider')]
@ -1075,8 +1075,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['TranslationWarningThreshold' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->TranslationWarningThreshold);
$this->assertSame($expected, $settingsArray['TranslationWarningThreshold']);
self::assertSame($expected, $settings->TranslationWarningThreshold);
self::assertSame($expected, $settingsArray['TranslationWarningThreshold']);
}
/** @return iterable<string, array{mixed, int}> */
@ -1094,8 +1094,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['AllowThirdPartyFraming' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->AllowThirdPartyFraming);
$this->assertSame($expected, $settingsArray['AllowThirdPartyFraming']);
self::assertSame($expected, $settings->AllowThirdPartyFraming);
self::assertSame($expected, $settingsArray['AllowThirdPartyFraming']);
}
/** @return iterable<string, array{mixed, bool|string}> */
@ -1113,8 +1113,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['blowfish_secret' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->blowfish_secret);
$this->assertSame($expected, $settingsArray['blowfish_secret']);
self::assertSame($expected, $settings->blowfish_secret);
self::assertSame($expected, $settingsArray['blowfish_secret']);
}
/** @return iterable<string, array{mixed, string}> */
@ -1132,9 +1132,9 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['Servers' => $actual]);
$settingsArray = $settings->asArray();
$this->assertEquals($expected, $settings->Servers);
self::assertEquals($expected, $settings->Servers);
$expectedArray = array_map(static fn (Server $server): array => $server->asArray(), $expected);
$this->assertSame($expectedArray, $settingsArray['Servers']);
self::assertSame($expectedArray, $settingsArray['Servers']);
}
/** @return iterable<string, array{mixed, array<int, Server>}> */
@ -1160,8 +1160,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['ServerDefault' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->ServerDefault);
$this->assertSame($expected, $settingsArray['ServerDefault']);
self::assertSame($expected, $settings->ServerDefault);
self::assertSame($expected, $settingsArray['ServerDefault']);
}
/** @return iterable<string, array{mixed, int}> */
@ -1178,8 +1178,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['VersionCheck' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->VersionCheck);
$this->assertSame($expected, $settingsArray['VersionCheck']);
self::assertSame($expected, $settings->VersionCheck);
self::assertSame($expected, $settingsArray['VersionCheck']);
}
#[DataProvider('valuesForProxyUrlProvider')]
@ -1187,8 +1187,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['ProxyUrl' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->ProxyUrl);
$this->assertSame($expected, $settingsArray['ProxyUrl']);
self::assertSame($expected, $settings->ProxyUrl);
self::assertSame($expected, $settingsArray['ProxyUrl']);
}
/** @return iterable<string, array{mixed, string}> */
@ -1205,8 +1205,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['ProxyUser' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->ProxyUser);
$this->assertSame($expected, $settingsArray['ProxyUser']);
self::assertSame($expected, $settings->ProxyUser);
self::assertSame($expected, $settingsArray['ProxyUser']);
}
/** @return iterable<string, array{mixed, string}> */
@ -1223,8 +1223,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['ProxyPass' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->ProxyPass);
$this->assertSame($expected, $settingsArray['ProxyPass']);
self::assertSame($expected, $settings->ProxyPass);
self::assertSame($expected, $settingsArray['ProxyPass']);
}
/** @return iterable<string, array{mixed, string}> */
@ -1241,8 +1241,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['MaxDbList' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->MaxDbList);
$this->assertSame($expected, $settingsArray['MaxDbList']);
self::assertSame($expected, $settings->MaxDbList);
self::assertSame($expected, $settingsArray['MaxDbList']);
}
/** @return iterable<string, array{mixed, int}> */
@ -1259,8 +1259,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['MaxTableList' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->MaxTableList);
$this->assertSame($expected, $settingsArray['MaxTableList']);
self::assertSame($expected, $settings->MaxTableList);
self::assertSame($expected, $settingsArray['MaxTableList']);
}
/** @return iterable<string, array{mixed, int}> */
@ -1277,8 +1277,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['ShowHint' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->ShowHint);
$this->assertSame($expected, $settingsArray['ShowHint']);
self::assertSame($expected, $settings->ShowHint);
self::assertSame($expected, $settingsArray['ShowHint']);
}
#[DataProvider('valuesForMaxCharactersInDisplayedSQLProvider')]
@ -1286,8 +1286,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['MaxCharactersInDisplayedSQL' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->MaxCharactersInDisplayedSQL);
$this->assertSame($expected, $settingsArray['MaxCharactersInDisplayedSQL']);
self::assertSame($expected, $settings->MaxCharactersInDisplayedSQL);
self::assertSame($expected, $settingsArray['MaxCharactersInDisplayedSQL']);
}
/** @return iterable<string, array{mixed, int}> */
@ -1304,8 +1304,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['OBGzip' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->OBGzip);
$this->assertSame($expected, $settingsArray['OBGzip']);
self::assertSame($expected, $settings->OBGzip);
self::assertSame($expected, $settingsArray['OBGzip']);
}
/** @return iterable<string, array{mixed, string|bool}> */
@ -1323,8 +1323,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['PersistentConnections' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->PersistentConnections);
$this->assertSame($expected, $settingsArray['PersistentConnections']);
self::assertSame($expected, $settings->PersistentConnections);
self::assertSame($expected, $settingsArray['PersistentConnections']);
}
#[DataProvider('valuesForExecTimeLimitProvider')]
@ -1332,8 +1332,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['ExecTimeLimit' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->ExecTimeLimit);
$this->assertSame($expected, $settingsArray['ExecTimeLimit']);
self::assertSame($expected, $settings->ExecTimeLimit);
self::assertSame($expected, $settingsArray['ExecTimeLimit']);
}
/** @return iterable<string, array{mixed, int}> */
@ -1350,8 +1350,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['SessionSavePath' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->SessionSavePath);
$this->assertSame($expected, $settingsArray['SessionSavePath']);
self::assertSame($expected, $settings->SessionSavePath);
self::assertSame($expected, $settingsArray['SessionSavePath']);
}
/** @return iterable<string, array{mixed, string}> */
@ -1368,8 +1368,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['ShowAll' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->showAll);
$this->assertSame($expected, $settingsArray['ShowAll']);
self::assertSame($expected, $settings->showAll);
self::assertSame($expected, $settingsArray['ShowAll']);
}
/** @return iterable<string, array{mixed, bool}> */
@ -1386,8 +1386,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['MaxRows' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->maxRows);
$this->assertSame($expected, $settingsArray['MaxRows']);
self::assertSame($expected, $settings->maxRows);
self::assertSame($expected, $settingsArray['MaxRows']);
}
/** @return iterable<string, array{mixed, int}> */
@ -1404,8 +1404,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['LimitChars' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->limitChars);
$this->assertSame($expected, $settingsArray['LimitChars']);
self::assertSame($expected, $settings->limitChars);
self::assertSame($expected, $settingsArray['LimitChars']);
}
/** @return iterable<string, array{mixed, int}> */
@ -1422,8 +1422,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['RepeatCells' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->repeatCells);
$this->assertSame($expected, $settingsArray['RepeatCells']);
self::assertSame($expected, $settings->repeatCells);
self::assertSame($expected, $settingsArray['RepeatCells']);
}
/** @return iterable<string, array{mixed, int}> */
@ -1440,8 +1440,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['ZeroConf' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->zeroConf);
$this->assertSame($expected, $settingsArray['ZeroConf']);
self::assertSame($expected, $settings->zeroConf);
self::assertSame($expected, $settingsArray['ZeroConf']);
}
/** @return iterable<string, array{mixed, bool}> */
@ -1459,8 +1459,8 @@ class SettingsTest extends TestCase
{
$settings = new Settings(['MysqlMinVersion' => $actual]);
$settingsArray = $settings->asArray();
$this->assertSame($expected, $settings->mysqlMinVersion);
$this->assertSame($expected, $settingsArray['MysqlMinVersion']);
self::assertSame($expected, $settings->mysqlMinVersion);
self::assertSame($expected, $settingsArray['MysqlMinVersion']);
}
/** @return iterable<string, array{mixed, array{internal: int, human: string}}> */

View File

@ -17,15 +17,15 @@ class RelationCleanupTest extends AbstractTestCase
{
public function testColumnWithoutRelations(): void
{
$dbi = $this->createMock(DatabaseInterface::class);
$dbi->expects($this->never())->method('queryAsControlUser');
$dbi = self::createMock(DatabaseInterface::class);
$dbi->expects(self::never())->method('queryAsControlUser');
(new RelationCleanup($dbi, new Relation($dbi)))->column('database', 'table', 'column');
}
public function testColumnWithRelations(): void
{
$relation = $this->createStub(Relation::class);
$relation = self::createStub(Relation::class);
$relation->method('getRelationParameters')->willReturn(RelationParameters::fromArray([
'user' => 'user',
'db' => 'pmadb',
@ -37,11 +37,11 @@ class RelationCleanupTest extends AbstractTestCase
'column_info' => 'column_info',
]));
$dbi = $this->createMock(DatabaseInterface::class);
$dbi->expects($this->any())->method('quoteString')
$dbi = self::createMock(DatabaseInterface::class);
$dbi->expects(self::any())->method('quoteString')
->willReturnCallback(static fn (string $string): string => "'" . $string . "'");
$result = $this->createStub(ResultInterface::class);
$dbi->expects($this->exactly(4))->method('queryAsControlUser')->willReturnMap([
$result = self::createStub(ResultInterface::class);
$dbi->expects(self::exactly(4))->method('queryAsControlUser')->willReturnMap([
[
"DELETE FROM `pmadb`.`column_info` WHERE db_name = 'database' AND"
. " table_name = 'table' AND column_name = 'column'",
@ -69,15 +69,15 @@ class RelationCleanupTest extends AbstractTestCase
public function testTableWithoutRelations(): void
{
$dbi = $this->createMock(DatabaseInterface::class);
$dbi->expects($this->never())->method('queryAsControlUser');
$dbi = self::createMock(DatabaseInterface::class);
$dbi->expects(self::never())->method('queryAsControlUser');
(new RelationCleanup($dbi, new Relation($dbi)))->table('database', 'table');
}
public function testTableWithRelations(): void
{
$relation = $this->createStub(Relation::class);
$relation = self::createStub(Relation::class);
$relation->method('getRelationParameters')->willReturn(RelationParameters::fromArray([
'user' => 'user',
'db' => 'pmadb',
@ -96,11 +96,11 @@ class RelationCleanupTest extends AbstractTestCase
'navigationhiding' => 'navigationhiding',
]));
$dbi = $this->createMock(DatabaseInterface::class);
$dbi->expects($this->any())->method('quoteString')
$dbi = self::createMock(DatabaseInterface::class);
$dbi->expects(self::any())->method('quoteString')
->willReturnCallback(static fn (string $string): string => "'" . $string . "'");
$result = $this->createStub(ResultInterface::class);
$dbi->expects($this->exactly(7))->method('queryAsControlUser')->willReturnMap([
$result = self::createStub(ResultInterface::class);
$dbi->expects(self::exactly(7))->method('queryAsControlUser')->willReturnMap([
["DELETE FROM `pmadb`.`column_info` WHERE db_name = 'database' AND table_name = 'table'", $result],
["DELETE FROM `pmadb`.`table_info` WHERE db_name = 'database' AND table_name = 'table'", $result],
["DELETE FROM `pmadb`.`table_coords` WHERE db_name = 'database' AND table_name = 'table'", $result],
@ -119,15 +119,15 @@ class RelationCleanupTest extends AbstractTestCase
public function testDatabaseWithoutRelations(): void
{
$dbi = $this->createMock(DatabaseInterface::class);
$dbi->expects($this->never())->method('queryAsControlUser');
$dbi = self::createMock(DatabaseInterface::class);
$dbi->expects(self::never())->method('queryAsControlUser');
(new RelationCleanup($dbi, new Relation($dbi)))->database('database');
}
public function testDatabaseWithRelations(): void
{
$relation = $this->createStub(Relation::class);
$relation = self::createStub(Relation::class);
$relation->method('getRelationParameters')->willReturn(RelationParameters::fromArray([
'user' => 'user',
'db' => 'pmadb',
@ -152,11 +152,11 @@ class RelationCleanupTest extends AbstractTestCase
'central_columns' => 'central_columns',
]));
$dbi = $this->createMock(DatabaseInterface::class);
$dbi->expects($this->any())->method('quoteString')
$dbi = self::createMock(DatabaseInterface::class);
$dbi->expects(self::any())->method('quoteString')
->willReturnCallback(static fn (string $string): string => "'" . $string . "'");
$result = $this->createStub(ResultInterface::class);
$dbi->expects($this->exactly(11))->method('queryAsControlUser')->willReturnMap([
$result = self::createStub(ResultInterface::class);
$dbi->expects(self::exactly(11))->method('queryAsControlUser')->willReturnMap([
["DELETE FROM `pmadb`.`column_info` WHERE db_name = 'database'", $result],
["DELETE FROM `pmadb`.`bookmark` WHERE dbase = 'database'", $result],
["DELETE FROM `pmadb`.`table_info` WHERE db_name = 'database'", $result],
@ -175,15 +175,15 @@ class RelationCleanupTest extends AbstractTestCase
public function testUserWithoutRelations(): void
{
$dbi = $this->createMock(DatabaseInterface::class);
$dbi->expects($this->never())->method('queryAsControlUser');
$dbi = self::createMock(DatabaseInterface::class);
$dbi->expects(self::never())->method('queryAsControlUser');
(new RelationCleanup($dbi, new Relation($dbi)))->user('user');
}
public function testUserWithRelations(): void
{
$relation = $this->createStub(Relation::class);
$relation = self::createStub(Relation::class);
$relation->method('getRelationParameters')->willReturn(RelationParameters::fromArray([
'user' => 'user',
'db' => 'pmadb',
@ -210,11 +210,11 @@ class RelationCleanupTest extends AbstractTestCase
'designer_settings' => 'designer_settings',
]));
$dbi = $this->createMock(DatabaseInterface::class);
$dbi->expects($this->any())->method('quoteString')
$dbi = self::createMock(DatabaseInterface::class);
$dbi->expects(self::any())->method('quoteString')
->willReturnCallback(static fn (string $string): string => "'" . $string . "'");
$result = $this->createStub(ResultInterface::class);
$dbi->expects($this->exactly(10))->method('queryAsControlUser')->willReturnMap([
$result = self::createStub(ResultInterface::class);
$dbi->expects(self::exactly(10))->method('queryAsControlUser')->willReturnMap([
["DELETE FROM `pmadb`.`bookmark` WHERE `user` = 'user'", $result],
["DELETE FROM `pmadb`.`history` WHERE `username` = 'user'", $result],
["DELETE FROM `pmadb`.`recent` WHERE `username` = 'user'", $result],

View File

@ -52,37 +52,37 @@ class RelationParametersTest extends TestCase
{
public function testFeaturesWithTwoTables(): void
{
$this->assertNull(RelationParameters::fromArray([
self::assertNull(RelationParameters::fromArray([
'db' => 'db',
'pdf_pages' => 'pdf_pages',
'table_coords' => ' invalid ',
'pdfwork' => true,
])->pdfFeature);
$this->assertNull(RelationParameters::fromArray([
self::assertNull(RelationParameters::fromArray([
'db' => 'db',
'pdf_pages' => ' invalid ',
'table_coords' => 'table_coords',
'pdfwork' => true,
])->pdfFeature);
$this->assertNull(RelationParameters::fromArray([
self::assertNull(RelationParameters::fromArray([
'db' => 'db',
'relation' => 'relation',
'table_info' => ' invalid ',
'displaywork' => true,
])->displayFeature);
$this->assertNull(RelationParameters::fromArray([
self::assertNull(RelationParameters::fromArray([
'db' => 'db',
'relation' => ' invalid ',
'table_info' => 'table_info',
'displaywork' => true,
])->displayFeature);
$this->assertNull(RelationParameters::fromArray([
self::assertNull(RelationParameters::fromArray([
'db' => 'db',
'usergroups' => 'usergroups',
'users' => ' invalid ',
'menuwork' => true,
])->configurableMenusFeature);
$this->assertNull(RelationParameters::fromArray([
self::assertNull(RelationParameters::fromArray([
'db' => 'db',
'usergroups' => ' invalid ',
'users' => 'users',
@ -102,18 +102,15 @@ class RelationParametersTest extends TestCase
'displaywork' => true,
'relwork' => true,
]);
$this->assertNotNull($relationParameters->browserTransformationFeature);
$this->assertNotNull($relationParameters->columnCommentsFeature);
$this->assertNotNull($relationParameters->displayFeature);
$this->assertNotNull($relationParameters->relationFeature);
$this->assertSame(
self::assertNotNull($relationParameters->browserTransformationFeature);
self::assertNotNull($relationParameters->columnCommentsFeature);
self::assertNotNull($relationParameters->displayFeature);
self::assertNotNull($relationParameters->relationFeature);
self::assertSame(
$relationParameters->browserTransformationFeature->columnInfo,
$relationParameters->columnCommentsFeature->columnInfo,
);
$this->assertSame(
$relationParameters->relationFeature->relation,
$relationParameters->displayFeature->relation,
);
self::assertSame($relationParameters->relationFeature->relation, $relationParameters->displayFeature->relation);
$relationParameters = RelationParameters::fromArray([
'db' => 'db',
@ -125,10 +122,10 @@ class RelationParametersTest extends TestCase
'displaywork' => true,
'relwork' => false,
]);
$this->assertNull($relationParameters->browserTransformationFeature);
$this->assertNotNull($relationParameters->columnCommentsFeature);
$this->assertNotNull($relationParameters->displayFeature);
$this->assertNull($relationParameters->relationFeature);
self::assertNull($relationParameters->browserTransformationFeature);
self::assertNotNull($relationParameters->columnCommentsFeature);
self::assertNotNull($relationParameters->displayFeature);
self::assertNull($relationParameters->relationFeature);
}
public function testFeaturesHaveSameDatabase(): void
@ -173,44 +170,44 @@ class RelationParametersTest extends TestCase
'uiprefswork' => true,
'userconfigwork' => true,
]);
$this->assertInstanceOf(DatabaseName::class, $relationParameters->db);
$this->assertEquals('db', $relationParameters->db->getName());
$this->assertNotNull($relationParameters->bookmarkFeature);
$this->assertSame($relationParameters->db, $relationParameters->bookmarkFeature->database);
$this->assertNotNull($relationParameters->browserTransformationFeature);
$this->assertSame($relationParameters->db, $relationParameters->browserTransformationFeature->database);
$this->assertNotNull($relationParameters->centralColumnsFeature);
$this->assertSame($relationParameters->db, $relationParameters->centralColumnsFeature->database);
$this->assertNotNull($relationParameters->columnCommentsFeature);
$this->assertSame($relationParameters->db, $relationParameters->columnCommentsFeature->database);
$this->assertNotNull($relationParameters->configurableMenusFeature);
$this->assertSame($relationParameters->db, $relationParameters->configurableMenusFeature->database);
$this->assertNotNull($relationParameters->databaseDesignerSettingsFeature);
$this->assertSame($relationParameters->db, $relationParameters->databaseDesignerSettingsFeature->database);
$this->assertNotNull($relationParameters->displayFeature);
$this->assertSame($relationParameters->db, $relationParameters->displayFeature->database);
$this->assertNotNull($relationParameters->exportTemplatesFeature);
$this->assertSame($relationParameters->db, $relationParameters->exportTemplatesFeature->database);
$this->assertNotNull($relationParameters->favoriteTablesFeature);
$this->assertSame($relationParameters->db, $relationParameters->favoriteTablesFeature->database);
$this->assertNotNull($relationParameters->navigationItemsHidingFeature);
$this->assertSame($relationParameters->db, $relationParameters->navigationItemsHidingFeature->database);
$this->assertNotNull($relationParameters->pdfFeature);
$this->assertSame($relationParameters->db, $relationParameters->pdfFeature->database);
$this->assertNotNull($relationParameters->recentlyUsedTablesFeature);
$this->assertSame($relationParameters->db, $relationParameters->recentlyUsedTablesFeature->database);
$this->assertNotNull($relationParameters->relationFeature);
$this->assertSame($relationParameters->db, $relationParameters->relationFeature->database);
$this->assertNotNull($relationParameters->savedQueryByExampleSearchesFeature);
$this->assertSame($relationParameters->db, $relationParameters->savedQueryByExampleSearchesFeature->database);
$this->assertNotNull($relationParameters->sqlHistoryFeature);
$this->assertSame($relationParameters->db, $relationParameters->sqlHistoryFeature->database);
$this->assertNotNull($relationParameters->trackingFeature);
$this->assertSame($relationParameters->db, $relationParameters->trackingFeature->database);
$this->assertNotNull($relationParameters->uiPreferencesFeature);
$this->assertSame($relationParameters->db, $relationParameters->uiPreferencesFeature->database);
$this->assertNotNull($relationParameters->userPreferencesFeature);
$this->assertSame($relationParameters->db, $relationParameters->userPreferencesFeature->database);
self::assertInstanceOf(DatabaseName::class, $relationParameters->db);
self::assertEquals('db', $relationParameters->db->getName());
self::assertNotNull($relationParameters->bookmarkFeature);
self::assertSame($relationParameters->db, $relationParameters->bookmarkFeature->database);
self::assertNotNull($relationParameters->browserTransformationFeature);
self::assertSame($relationParameters->db, $relationParameters->browserTransformationFeature->database);
self::assertNotNull($relationParameters->centralColumnsFeature);
self::assertSame($relationParameters->db, $relationParameters->centralColumnsFeature->database);
self::assertNotNull($relationParameters->columnCommentsFeature);
self::assertSame($relationParameters->db, $relationParameters->columnCommentsFeature->database);
self::assertNotNull($relationParameters->configurableMenusFeature);
self::assertSame($relationParameters->db, $relationParameters->configurableMenusFeature->database);
self::assertNotNull($relationParameters->databaseDesignerSettingsFeature);
self::assertSame($relationParameters->db, $relationParameters->databaseDesignerSettingsFeature->database);
self::assertNotNull($relationParameters->displayFeature);
self::assertSame($relationParameters->db, $relationParameters->displayFeature->database);
self::assertNotNull($relationParameters->exportTemplatesFeature);
self::assertSame($relationParameters->db, $relationParameters->exportTemplatesFeature->database);
self::assertNotNull($relationParameters->favoriteTablesFeature);
self::assertSame($relationParameters->db, $relationParameters->favoriteTablesFeature->database);
self::assertNotNull($relationParameters->navigationItemsHidingFeature);
self::assertSame($relationParameters->db, $relationParameters->navigationItemsHidingFeature->database);
self::assertNotNull($relationParameters->pdfFeature);
self::assertSame($relationParameters->db, $relationParameters->pdfFeature->database);
self::assertNotNull($relationParameters->recentlyUsedTablesFeature);
self::assertSame($relationParameters->db, $relationParameters->recentlyUsedTablesFeature->database);
self::assertNotNull($relationParameters->relationFeature);
self::assertSame($relationParameters->db, $relationParameters->relationFeature->database);
self::assertNotNull($relationParameters->savedQueryByExampleSearchesFeature);
self::assertSame($relationParameters->db, $relationParameters->savedQueryByExampleSearchesFeature->database);
self::assertNotNull($relationParameters->sqlHistoryFeature);
self::assertSame($relationParameters->db, $relationParameters->sqlHistoryFeature->database);
self::assertNotNull($relationParameters->trackingFeature);
self::assertSame($relationParameters->db, $relationParameters->trackingFeature->database);
self::assertNotNull($relationParameters->uiPreferencesFeature);
self::assertSame($relationParameters->db, $relationParameters->uiPreferencesFeature->database);
self::assertNotNull($relationParameters->userPreferencesFeature);
self::assertSame($relationParameters->db, $relationParameters->userPreferencesFeature->database);
}
public function testHasAllFeatures(): void
@ -255,10 +252,10 @@ class RelationParametersTest extends TestCase
'uiprefswork' => true,
'userconfigwork' => true,
];
$this->assertFalse(RelationParameters::fromArray([])->hasAllFeatures());
$this->assertTrue(RelationParameters::fromArray($params)->hasAllFeatures());
self::assertFalse(RelationParameters::fromArray([])->hasAllFeatures());
self::assertTrue(RelationParameters::fromArray($params)->hasAllFeatures());
$params['bookmarkwork'] = false;
$this->assertFalse(RelationParameters::fromArray($params)->hasAllFeatures());
self::assertFalse(RelationParameters::fromArray($params)->hasAllFeatures());
}
/**
@ -268,7 +265,7 @@ class RelationParametersTest extends TestCase
#[DataProvider('providerForTestToArray')]
public function testToArray(array $params, array $expected): void
{
$this->assertSame($expected, RelationParameters::fromArray($params)->toArray());
self::assertSame($expected, RelationParameters::fromArray($params)->toArray());
}
/** @return array<string, array<int, array<string, mixed>>> */

View File

@ -42,7 +42,7 @@ class RelationTest extends AbstractTestCase
$dummyDbi->addSelectDb('phpmyadmin');
$db = 'information_schema';
$table = 'CHARACTER_SETS';
$this->assertEquals(
self::assertEquals(
'DESCRIPTION',
$relation->getDisplayField($db, $table),
);
@ -50,14 +50,14 @@ class RelationTest extends AbstractTestCase
$db = 'information_schema';
$table = 'TABLES';
$this->assertEquals(
self::assertEquals(
'TABLE_COMMENT',
$relation->getDisplayField($db, $table),
);
$db = 'information_schema';
$table = 'PMA';
$this->assertSame(
self::assertSame(
'',
$relation->getDisplayField($db, $table),
);
@ -80,7 +80,7 @@ class RelationTest extends AbstractTestCase
new ColumnFull('field1', 'int(11)', null, false, '', null, '', '', 'Comment1'),
new ColumnFull('field2', 'text', null, false, '', null, '', '', 'Comment1'),
];
$dbi->expects($this->any())->method('getColumns')
$dbi->expects(self::any())->method('getColumns')
->willReturn($getColumnsResult);
$relation = new Relation($dbi);
@ -88,14 +88,14 @@ class RelationTest extends AbstractTestCase
DatabaseInterface::$instance = $dbi;
$db = 'information_schema';
$this->assertEquals(
self::assertEquals(
[''],
$relation->getComments($db),
);
$db = 'information_schema';
$table = 'TABLES';
$this->assertEquals(
self::assertEquals(
['field1' => 'Comment1', 'field2' => 'Comment1'],
$relation->getComments($db, $table),
);
@ -106,18 +106,18 @@ class RelationTest extends AbstractTestCase
*/
public function testPMATryUpgradeTransformations(): void
{
$resultStub = $this->createMock(DummyResult::class);
$resultStub = self::createMock(DummyResult::class);
$dbi = $this->getMockBuilder(DatabaseInterface::class)
->disableOriginalConstructor()
->getMock();
$dbi->expects($this->any())
$dbi->expects(self::any())
->method('tryQueryAsControlUser')
->willReturn($resultStub);
$resultStub->expects($this->any())
$resultStub->expects(self::any())
->method('numRows')
->willReturn(0);
$dbi->expects($this->any())
$dbi->expects(self::any())
->method('getError')
->willReturn('Error', '');
DatabaseInterface::$instance = $dbi;
@ -130,17 +130,17 @@ class RelationTest extends AbstractTestCase
// Case 1
$actual = $relation->tryUpgradeTransformations();
$this->assertFalse($actual);
self::assertFalse($actual);
// Case 2
$actual = $relation->tryUpgradeTransformations();
$this->assertTrue($actual);
self::assertTrue($actual);
}
public function testSearchColumnInForeignersError(): void
{
$relation = new Relation($this->createDatabaseInterface());
$this->assertFalse($relation->searchColumnInForeigners([], 'id'));
self::assertFalse($relation->searchColumnInForeigners([], 'id'));
}
/**
@ -179,7 +179,7 @@ class RelationTest extends AbstractTestCase
$expected['on_delete'] = 'CASCADE';
$expected['on_update'] = 'CASCADE';
$this->assertEquals($expected, $foreigner);
self::assertEquals($expected, $foreigner);
}
public function testFixPmaTablesNothingWorks(): void
@ -251,7 +251,7 @@ class RelationTest extends AbstractTestCase
'userconfigwork' => true,
'userconfig' => 'pma__userconfig',
]);
$this->assertSame($relationParameters->toArray(), $relation->getRelationParameters()->toArray());
self::assertSame($relationParameters->toArray(), $relation->getRelationParameters()->toArray());
$dummyDbi->assertAllQueriesConsumed();
$dummyDbi->assertAllSelectsConsumed();
@ -510,20 +510,20 @@ class RelationTest extends AbstractTestCase
true,
);
$this->assertSame('', $config->selectedServer['pmadb']);
self::assertSame('', $config->selectedServer['pmadb']);
(new ReflectionProperty(Relation::class, 'cache'))->setValue(null, null);
$relation->fixPmaTables('db_pma', true);
$this->assertArrayNotHasKey('message', $GLOBALS);
$this->assertSame('db_pma', $config->selectedServer['pmadb']);
self::assertArrayNotHasKey('message', $GLOBALS);
self::assertSame('db_pma', $config->selectedServer['pmadb']);
$relationParameters = RelationParameters::fromArray([
'db' => 'db_pma',
'userconfigwork' => true,
'userconfig' => 'pma__userconfig',
]);
$this->assertSame($relationParameters->toArray(), $relation->getRelationParameters()->toArray());
self::assertSame($relationParameters->toArray(), $relation->getRelationParameters()->toArray());
$dummyDbi->assertAllQueriesConsumed();
$dummyDbi->assertAllSelectsConsumed();
@ -790,22 +790,22 @@ class RelationTest extends AbstractTestCase
true,
);
$this->assertSame('db_pma', $config->selectedServer['pmadb']);
self::assertSame('db_pma', $config->selectedServer['pmadb']);
(new ReflectionProperty(Relation::class, 'cache'))->setValue(null, null);
$dummyDbi->addSelectDb('db_pma');
$dummyDbi->addSelectDb('db_pma');
$relation->fixPmaTables('db_pma', true);
$this->assertArrayNotHasKey('message', $GLOBALS);
$this->assertSame('db_pma', $config->selectedServer['pmadb']);
self::assertArrayNotHasKey('message', $GLOBALS);
self::assertSame('db_pma', $config->selectedServer['pmadb']);
$relationParameters = RelationParameters::fromArray([
'db' => 'db_pma',
'userconfigwork' => true,
'userconfig' => 'pma__userconfig',
]);
$this->assertSame($relationParameters->toArray(), $relation->getRelationParameters()->toArray());
self::assertSame($relationParameters->toArray(), $relation->getRelationParameters()->toArray());
$dummyDbi->assertAllQueriesConsumed();
$dummyDbi->assertAllSelectsConsumed();
@ -865,17 +865,17 @@ class RelationTest extends AbstractTestCase
);
$dummyDbi->addSelectDb('db_pma');
$this->assertSame('', $config->selectedServer['pmadb']);
self::assertSame('', $config->selectedServer['pmadb']);
(new ReflectionProperty(Relation::class, 'cache'))->setValue(null, null);
$relation->fixPmaTables('db_pma', true);
$this->assertArrayHasKey('message', $GLOBALS);
$this->assertSame('MYSQL_ERROR', $GLOBALS['message']);
$this->assertSame('', $config->selectedServer['pmadb']);
self::assertArrayHasKey('message', $GLOBALS);
self::assertSame('MYSQL_ERROR', $GLOBALS['message']);
self::assertSame('', $config->selectedServer['pmadb']);
$this->assertNull((new ReflectionProperty(Relation::class, 'cache'))->getValue());
self::assertNull((new ReflectionProperty(Relation::class, 'cache'))->getValue());
$dummyDbi->assertAllQueriesConsumed();
$dummyDbi->assertAllErrorCodesConsumed();
@ -902,13 +902,13 @@ class RelationTest extends AbstractTestCase
);
$dummyDbi->addSelectDb('phpmyadmin');
$this->assertArrayNotHasKey('errno', $GLOBALS);
self::assertArrayNotHasKey('errno', $GLOBALS);
$this->assertTrue(
self::assertTrue(
$relation->createPmaDatabase('phpmyadmin'),
);
$this->assertArrayNotHasKey('message', $GLOBALS);
self::assertArrayNotHasKey('message', $GLOBALS);
$dummyDbi->assertAllQueriesConsumed();
$dummyDbi->assertAllErrorCodesConsumed();
@ -928,12 +928,12 @@ class RelationTest extends AbstractTestCase
$GLOBALS['errno'] = 1044;// ER_DBACCESS_DENIED_ERROR
$this->assertFalse(
self::assertFalse(
$relation->createPmaDatabase('phpmyadmin'),
);
$this->assertArrayHasKey('message', $GLOBALS);
$this->assertSame(
self::assertArrayHasKey('message', $GLOBALS);
self::assertSame(
'You do not have necessary privileges to create a database named'
. ' \'phpmyadmin\'. You may go to \'Operations\' tab of any'
. ' database to set up the phpMyAdmin configuration storage there.',
@ -957,12 +957,12 @@ class RelationTest extends AbstractTestCase
$GLOBALS['errno'] = 1040;
$this->assertFalse(
self::assertFalse(
$relation->createPmaDatabase('pma_1040'),
);
$this->assertArrayHasKey('message', $GLOBALS);
$this->assertSame('Too many connections', $GLOBALS['message']);
self::assertArrayHasKey('message', $GLOBALS);
self::assertSame('Too many connections', $GLOBALS['message']);
$dummyDbi->assertAllQueriesConsumed();
$dummyDbi->assertAllErrorCodesConsumed();
@ -1363,7 +1363,7 @@ class RelationTest extends AbstractTestCase
]),
];
$this->assertSame(
self::assertSame(
$data,
$relation->getCreateTableSqlQueries([]),
);
@ -1390,7 +1390,7 @@ class RelationTest extends AbstractTestCase
' DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;',
]);
$this->assertSame(
self::assertSame(
$data,
$relation->getCreateTableSqlQueries(['pma__export_templates' => 'db_exporttemplates_pma']),
);
@ -1436,9 +1436,9 @@ class RelationTest extends AbstractTestCase
// Should all be false for server = 0
$relationParameters = RelationParameters::fromArray([]);
$this->assertSame($relationParameters->toArray(), $relation->getRelationParameters()->toArray());
self::assertSame($relationParameters->toArray(), $relation->getRelationParameters()->toArray());
$this->assertEquals([
self::assertEquals([
'userconfig' => 'pma__userconfig',
'pmadb' => false,// This is the expected value for server = 0
], $config->selectedServer);
@ -1503,9 +1503,9 @@ class RelationTest extends AbstractTestCase
'userconfigwork' => true,
'userconfig' => 'pma__userconfig',
]);
$this->assertSame($relationParameters->toArray(), $relation->getRelationParameters()->toArray());
self::assertSame($relationParameters->toArray(), $relation->getRelationParameters()->toArray());
$this->assertSame([
self::assertSame([
'user' => '',
'pmadb' => 'phpmyadmin',
'bookmarktable' => '',
@ -1589,9 +1589,9 @@ class RelationTest extends AbstractTestCase
'userconfigwork' => false,
'userconfig' => 'pma__userconfig',
]);
$this->assertSame($relationParameters->toArray(), $relation->getRelationParameters()->toArray());
self::assertSame($relationParameters->toArray(), $relation->getRelationParameters()->toArray());
$this->assertSame([
self::assertSame([
'user' => '',
'pmadb' => 'phpmyadmin',
'bookmarktable' => '',
@ -1670,7 +1670,7 @@ class RelationTest extends AbstractTestCase
$relation = new Relation($dbi);
$relation->initRelationParamsCache();
$this->assertArrayHasKey(
self::assertArrayHasKey(
'relation',
$relation->getRelationParameters()->toArray(),
'The cache is expected to be filled because the custom override'
@ -1698,9 +1698,9 @@ class RelationTest extends AbstractTestCase
'userconfigwork' => true,
'userconfig' => 'pma__userconfig_custom',
]);
$this->assertSame($relationParameters->toArray(), $relationData->toArray());
self::assertSame($relationParameters->toArray(), $relationData->toArray());
$this->assertSame([
self::assertSame([
'user' => '',
'pmadb' => 'PMA-storage',
'bookmarktable' => '',
@ -1785,7 +1785,7 @@ class RelationTest extends AbstractTestCase
* The method above does't initialize Relation param cache.
* A proper test is needed to verify that the user disabled features result in disabled Relation cache.
*/
$this->assertArrayHasKey(
self::assertArrayHasKey(
'relation',
$relation->getRelationParameters()->toArray(),
'The cache is expected to be filled because the custom override'
@ -1816,10 +1816,10 @@ class RelationTest extends AbstractTestCase
'trackingwork' => false,
'tracking' => false,
]);
$this->assertSame($relationParameters->toArray(), $relationData->toArray());
$this->assertNull($relationParameters->trackingFeature, 'The feature should not be enabled');
self::assertSame($relationParameters->toArray(), $relationData->toArray());
self::assertNull($relationParameters->trackingFeature, 'The feature should not be enabled');
$this->assertSame([
self::assertSame([
'user' => '',
'pmadb' => 'PMA-storage',
'bookmarktable' => '',
@ -1904,7 +1904,7 @@ class RelationTest extends AbstractTestCase
$relation = new Relation($dbi);
$relation->initRelationParamsCache();
$this->assertArrayHasKey(
self::assertArrayHasKey(
'relation',
$relation->getRelationParameters()->toArray(),
'The cache is expected to be filled because the custom override'
@ -1924,10 +1924,10 @@ class RelationTest extends AbstractTestCase
'favorite' => 'pma__favorite_custom',
'favoritework' => true,
]);
$this->assertSame($relationParameters->toArray(), $relationData->toArray());
$this->assertNull($relationParameters->trackingFeature, 'The feature should not be enabled');
self::assertSame($relationParameters->toArray(), $relationData->toArray());
self::assertNull($relationParameters->trackingFeature, 'The feature should not be enabled');
$this->assertSame([
self::assertSame([
'user' => '',
'pmadb' => 'PMA-storage',
'bookmarktable' => '',
@ -1984,8 +1984,8 @@ class RelationTest extends AbstractTestCase
$relation = new Relation($dbi);
$this->assertFalse($relation->arePmadbTablesDefined());
$this->assertFalse($relation->arePmadbTablesAllDisabled());
self::assertFalse($relation->arePmadbTablesDefined());
self::assertFalse($relation->arePmadbTablesAllDisabled());
$config->selectedServer['bookmarktable'] = '';
$config->selectedServer['relation'] = '';
@ -2007,8 +2007,8 @@ class RelationTest extends AbstractTestCase
$config->selectedServer['designer_settings'] = '';
$config->selectedServer['export_templates'] = '';
$this->assertFalse($relation->arePmadbTablesDefined());
$this->assertFalse($relation->arePmadbTablesAllDisabled());
self::assertFalse($relation->arePmadbTablesDefined());
self::assertFalse($relation->arePmadbTablesAllDisabled());
$config->selectedServer['bookmarktable'] = 'pma__bookmark';
$config->selectedServer['relation'] = 'pma__relation';
@ -2030,8 +2030,8 @@ class RelationTest extends AbstractTestCase
$config->selectedServer['designer_settings'] = 'pma__designer_settings';
$config->selectedServer['export_templates'] = 'pma__export_templates';
$this->assertTrue($relation->arePmadbTablesDefined());
$this->assertFalse($relation->arePmadbTablesAllDisabled());
self::assertTrue($relation->arePmadbTablesDefined());
self::assertFalse($relation->arePmadbTablesAllDisabled());
$config->selectedServer['bookmarktable'] = 'pma__bookmark';
$config->selectedServer['relation'] = 'pma__relation';
@ -2053,8 +2053,8 @@ class RelationTest extends AbstractTestCase
$config->selectedServer['designer_settings'] = 'pma__designer_settings';
$config->selectedServer['export_templates'] = 'pma__export_templates';
$this->assertTrue($relation->arePmadbTablesDefined());
$this->assertFalse($relation->arePmadbTablesAllDisabled());
self::assertTrue($relation->arePmadbTablesDefined());
self::assertFalse($relation->arePmadbTablesAllDisabled());
$config->selectedServer['bookmarktable'] = 'pma__bookmark';
$config->selectedServer['relation'] = 'pma__relation';
@ -2076,8 +2076,8 @@ class RelationTest extends AbstractTestCase
$config->selectedServer['designer_settings'] = 'pma__designer_settings';
$config->selectedServer['export_templates'] = 'pma__export_templates';
$this->assertFalse($relation->arePmadbTablesDefined());
$this->assertFalse($relation->arePmadbTablesAllDisabled());
self::assertFalse($relation->arePmadbTablesDefined());
self::assertFalse($relation->arePmadbTablesAllDisabled());
$config->selectedServer['bookmarktable'] = false; //'pma__bookmark';
$config->selectedServer['relation'] = false; //'pma__relation';
@ -2099,8 +2099,8 @@ class RelationTest extends AbstractTestCase
$config->selectedServer['designer_settings'] = false; //'pma__designer_settings';
$config->selectedServer['export_templates'] = false; //'pma__export_templates';
$this->assertFalse($relation->arePmadbTablesDefined());
$this->assertTrue($relation->arePmadbTablesAllDisabled());
self::assertFalse($relation->arePmadbTablesDefined());
self::assertTrue($relation->arePmadbTablesAllDisabled());
}
/**

View File

@ -49,24 +49,24 @@ class UserGroupsTest extends AbstractTestCase
{
$expectedQuery = 'SELECT * FROM `pmadb`.`usergroups` ORDER BY `usergroup` ASC';
$resultStub = $this->createMock(DummyResult::class);
$resultStub = self::createMock(DummyResult::class);
$dbi = $this->getMockBuilder(DatabaseInterface::class)
->disableOriginalConstructor()
->getMock();
$dbi->expects($this->once())
$dbi->expects(self::once())
->method('tryQueryAsControlUser')
->with($expectedQuery)
->willReturn($resultStub);
$resultStub->expects($this->once())
$resultStub->expects(self::once())
->method('numRows')
->willReturn(0);
DatabaseInterface::$instance = $dbi;
$html = UserGroups::getHtmlForUserGroupsTable($this->configurableMenusFeature);
$this->assertStringNotContainsString('<table id="userGroupsTable">', $html);
self::assertStringNotContainsString('<table id="userGroupsTable">', $html);
$urlTag = '<a class="btn btn-primary" href="' . Url::getFromRoute('/server/user-groups', ['addUserGroup' => 1]);
$this->assertStringContainsString($urlTag, $html);
self::assertStringContainsString($urlTag, $html);
}
/**
@ -75,14 +75,14 @@ class UserGroupsTest extends AbstractTestCase
public function testGetHtmlForUserGroupsTableWithUserGroups(): void
{
$html = UserGroups::getHtmlForUserGroupsTable($this->configurableMenusFeature);
$this->assertStringContainsString('<td>user&lt;br&gt;group</td>', $html);
self::assertStringContainsString('<td>user&lt;br&gt;group</td>', $html);
$urlTag = '<a class="" href="' . Url::getFromRoute('/server/user-groups') . '" data-post="'
. Url::getCommon(['viewUsers' => 1, 'userGroup' => 'user<br>group'], '');
$this->assertStringContainsString($urlTag, $html);
self::assertStringContainsString($urlTag, $html);
$urlTag = '<a class="" href="' . Url::getFromRoute('/server/user-groups') . '" data-post="'
. Url::getCommon(['editUserGroup' => 1, 'userGroup' => 'user<br>group'], '');
$this->assertStringContainsString($urlTag, $html);
$this->assertStringContainsString(
self::assertStringContainsString($urlTag, $html);
self::assertStringContainsString(
'<button type="button" class="btn btn-link" data-bs-toggle="modal"'
. ' data-bs-target="#deleteUserGroupModal" data-user-group="user&lt;br&gt;group">',
$html,
@ -97,13 +97,13 @@ class UserGroupsTest extends AbstractTestCase
$userDelQuery = 'DELETE FROM `pmadb`.`users` WHERE `usergroup`=\'ug\'';
$userGrpDelQuery = 'DELETE FROM `pmadb`.`usergroups` WHERE `usergroup`=\'ug\'';
$result = $this->createStub(ResultInterface::class);
$dbi = $this->createMock(DatabaseInterface::class);
$dbi->expects($this->exactly(2))->method('queryAsControlUser')->willReturnMap([
$result = self::createStub(ResultInterface::class);
$dbi = self::createMock(DatabaseInterface::class);
$dbi->expects(self::exactly(2))->method('queryAsControlUser')->willReturnMap([
[$userDelQuery, $result],
[$userGrpDelQuery, $result],
]);
$dbi->expects($this->any())->method('quoteString')
$dbi->expects(self::any())->method('quoteString')
->willReturnCallback(static fn (string $string): string => "'" . $string . "'");
UserGroups::delete($dbi, $this->configurableMenusFeature, 'ug');
@ -116,41 +116,41 @@ class UserGroupsTest extends AbstractTestCase
{
// adding a user group
$html = UserGroups::getHtmlToEditUserGroup($this->configurableMenusFeature);
$this->assertStringContainsString('<input type="hidden" name="addUserGroupSubmit" value="1"', $html);
$this->assertStringContainsString('<input class="form-control" type="text" name="userGroup"', $html);
self::assertStringContainsString('<input type="hidden" name="addUserGroupSubmit" value="1"', $html);
self::assertStringContainsString('<input class="form-control" type="text" name="userGroup"', $html);
$resultStub = $this->createMock(DummyResult::class);
$resultStub = self::createMock(DummyResult::class);
$expectedQuery = 'SELECT * FROM `pmadb`.`usergroups` WHERE `usergroup`=\'user<br>group\'';
$dbi = $this->getMockBuilder(DatabaseInterface::class)
->disableOriginalConstructor()
->getMock();
$dbi->expects($this->once())
$dbi->expects(self::once())
->method('tryQueryAsControlUser')
->with($expectedQuery)
->willReturn($resultStub);
$resultStub->expects($this->exactly(1))
$resultStub->expects(self::exactly(1))
->method('getIterator')
->willReturnCallback(static function (): Generator {
yield from [['usergroup' => 'user<br>group', 'tab' => 'server_sql', 'allowed' => 'Y']];
});
$dbi->expects($this->any())->method('quoteString')
$dbi->expects(self::any())->method('quoteString')
->willReturnCallback(static fn (string $string): string => "'" . $string . "'");
DatabaseInterface::$instance = $dbi;
// editing a user group
$html = UserGroups::getHtmlToEditUserGroup($this->configurableMenusFeature, 'user<br>group');
$this->assertStringContainsString('Edit user group: \'user&lt;br&gt;group\'', $html);
$this->assertStringContainsString('<input type="hidden" name="userGroup" value="user&lt;br&gt;group"', $html);
$this->assertStringContainsString('<input type="hidden" name="editUserGroupSubmit" value="1"', $html);
$this->assertStringContainsString('<input type="hidden" name="editUserGroupSubmit" value="1"', $html);
$this->assertStringContainsString(
self::assertStringContainsString('Edit user group: \'user&lt;br&gt;group\'', $html);
self::assertStringContainsString('<input type="hidden" name="userGroup" value="user&lt;br&gt;group"', $html);
self::assertStringContainsString('<input type="hidden" name="editUserGroupSubmit" value="1"', $html);
self::assertStringContainsString('<input type="hidden" name="editUserGroupSubmit" value="1"', $html);
self::assertStringContainsString(
'<input class="form-check-input checkall" type="checkbox"'
. ' checked="checked" name="server_sql" id="server_sql" value="Y">',
$html,
);
$this->assertStringContainsString(
self::assertStringContainsString(
'<input class="form-check-input checkall" type="checkbox"'
. ' name="server_databases" id="server_databases" value="Y">',
$html,
@ -166,8 +166,8 @@ class UserGroupsTest extends AbstractTestCase
$dummyDbi->addResult('SELECT `username` FROM `pmadb`.`users` WHERE `usergroup`=\'user<br>group\'', []);
$output = UserGroups::getHtmlForListingUsersofAGroup($this->configurableMenusFeature, 'user<br>group');
$this->assertStringContainsString('Users of \'user&lt;br&gt;group\' user group', $output);
$this->assertStringContainsString('No users were found belonging to this user group.', $output);
self::assertStringContainsString('Users of \'user&lt;br&gt;group\' user group', $output);
self::assertStringContainsString('No users were found belonging to this user group.', $output);
}
public function testGetHtmlForListingUsersOfAGroupWithUsers(): void
@ -183,11 +183,11 @@ class UserGroupsTest extends AbstractTestCase
);
$output = UserGroups::getHtmlForListingUsersofAGroup($this->configurableMenusFeature, 'user<br>group');
$this->assertStringContainsString('Users of \'user&lt;br&gt;group\' user group', $output);
$this->assertStringContainsString('<td>1</td>', $output);
$this->assertStringContainsString('<td>user&lt;br&gt;one</td>', $output);
$this->assertStringContainsString('<td>2</td>', $output);
$this->assertStringContainsString('<td>user&lt;br&gt;two</td>', $output);
$this->assertStringNotContainsString('No users were found belonging to this user group.', $output);
self::assertStringContainsString('Users of \'user&lt;br&gt;group\' user group', $output);
self::assertStringContainsString('<td>1</td>', $output);
self::assertStringContainsString('<td>user&lt;br&gt;one</td>', $output);
self::assertStringContainsString('<td>2</td>', $output);
self::assertStringContainsString('<td>user&lt;br&gt;two</td>', $output);
self::assertStringNotContainsString('No users were found belonging to this user group.', $output);
}
}

View File

@ -91,18 +91,18 @@ class ConfigTest extends AbstractTestCase
$defaultConfig = $this->createConfig();
$tmpConfig = tempnam('./', 'config.test.inc.php');
if ($tmpConfig === false) {
$this->markTestSkipped('Creating a temporary file does not work');
self::markTestSkipped('Creating a temporary file does not work');
}
$this->assertFileExists($tmpConfig);
self::assertFileExists($tmpConfig);
// end of setup
// Test loading an empty file does not change the default config
$config = new Config();
$config->loadAndCheck($tmpConfig);
$this->assertSame($defaultConfig->settings, $config->settings);
$this->assertEquals($defaultConfig->getSettings(), $config->getSettings());
self::assertSame($defaultConfig->settings, $config->settings);
self::assertEquals($defaultConfig->getSettings(), $config->getSettings());
$contents = <<<'PHP'
<?php
@ -115,15 +115,15 @@ PHP;
$config = new Config();
$config->loadAndCheck($tmpConfig);
$defaultConfig->set('environment', 'development');
$this->assertSame($defaultConfig->settings, $config->settings);
$this->assertArrayHasKey('environment', $config->settings);
$this->assertSame($config->settings['environment'], 'development');
$this->assertArrayNotHasKey('UnknownKey', $config->settings);
$this->assertEquals($defaultConfig->getSettings(), $config->getSettings());
self::assertSame($defaultConfig->settings, $config->settings);
self::assertArrayHasKey('environment', $config->settings);
self::assertSame($config->settings['environment'], 'development');
self::assertArrayNotHasKey('UnknownKey', $config->settings);
self::assertEquals($defaultConfig->getSettings(), $config->getSettings());
// Teardown
unlink($tmpConfig);
$this->assertFalse(file_exists($tmpConfig));
self::assertFalse(file_exists($tmpConfig));
}
/**
@ -134,7 +134,7 @@ PHP;
{
$this->object->checkSystem();
$this->assertIsBool($this->object->get('PMA_IS_WINDOWS'));
self::assertIsBool($this->object->get('PMA_IS_WINDOWS'));
}
/**
@ -147,13 +147,13 @@ PHP;
$this->object->set('PMA_USR_BROWSER_AGENT', 'IE');
$this->object->set('PMA_USR_BROWSER_VER', 6);
$this->object->checkOutputCompression();
$this->assertTrue($this->object->get('OBGzip'));
self::assertTrue($this->object->get('OBGzip'));
$this->object->set('OBGzip', 'auto');
$this->object->set('PMA_USR_BROWSER_AGENT', 'MOZILLA');
$this->object->set('PMA_USR_BROWSER_VER', 5);
$this->object->checkOutputCompression();
$this->assertTrue($this->object->get('OBGzip'));
self::assertTrue($this->object->get('OBGzip'));
}
/**
@ -173,14 +173,14 @@ PHP;
): void {
$_SERVER['HTTP_USER_AGENT'] = $agent;
$this->object->checkClient();
$this->assertEquals($os, $this->object->get('PMA_USR_OS'));
$this->assertEquals($browser, $this->object->get('PMA_USR_BROWSER_AGENT'));
self::assertEquals($os, $this->object->get('PMA_USR_OS'));
self::assertEquals($browser, $this->object->get('PMA_USR_BROWSER_AGENT'));
if ($version === null) {
return;
}
$this->assertEquals(
self::assertEquals(
$version,
$this->object->get('PMA_USR_BROWSER_VER'),
);
@ -258,17 +258,17 @@ PHP;
{
$this->object->set('GD2Available', 'yes');
$this->object->checkGd2();
$this->assertEquals(1, $this->object->get('PMA_IS_GD2'));
self::assertEquals(1, $this->object->get('PMA_IS_GD2'));
$this->object->set('GD2Available', 'no');
$this->object->checkGd2();
$this->assertEquals(0, $this->object->get('PMA_IS_GD2'));
self::assertEquals(0, $this->object->get('PMA_IS_GD2'));
$this->object->set('GD2Available', 'auto');
if (! function_exists('imagecreatetruecolor')) {
$this->object->checkGd2();
$this->assertEquals(
self::assertEquals(
0,
$this->object->get('PMA_IS_GD2'),
'imagecreatetruecolor does not exist, PMA_IS_GD2 should be 0',
@ -279,13 +279,13 @@ PHP;
$this->object->checkGd2();
$gdNfo = gd_info();
if (str_contains($gdNfo['GD Version'], '2.')) {
$this->assertEquals(
self::assertEquals(
1,
$this->object->get('PMA_IS_GD2'),
'GD Version >= 2, PMA_IS_GD2 should be 1',
);
} else {
$this->assertEquals(
self::assertEquals(
0,
$this->object->get('PMA_IS_GD2'),
'GD Version < 2, PMA_IS_GD2 should be 0',
@ -305,13 +305,13 @@ PHP;
// TODO: The variable $v clearly is incorrect. Was this meant to be $a?
if (str_contains($v, '2.')) {
$this->assertEquals(
self::assertEquals(
1,
$this->object->get('PMA_IS_GD2'),
'PMA_IS_GD2 should be 1',
);
} else {
$this->assertEquals(
self::assertEquals(
0,
$this->object->get('PMA_IS_GD2'),
'PMA_IS_GD2 should be 0',
@ -328,21 +328,21 @@ PHP;
if (defined('PHP_OS')) {
if (stristr(PHP_OS, 'darwin')) {
$this->assertFalse($this->object->get('PMA_IS_WINDOWS'));
self::assertFalse($this->object->get('PMA_IS_WINDOWS'));
} elseif (stristr(PHP_OS, 'win')) {
$this->assertTrue($this->object->get('PMA_IS_WINDOWS'));
self::assertTrue($this->object->get('PMA_IS_WINDOWS'));
} elseif (stristr(PHP_OS, 'OS/2')) {
$this->assertTrue($this->object->get('PMA_IS_WINDOWS'));
self::assertTrue($this->object->get('PMA_IS_WINDOWS'));
} elseif (stristr(PHP_OS, 'Linux')) {
$this->assertFalse($this->object->get('PMA_IS_WINDOWS'));
self::assertFalse($this->object->get('PMA_IS_WINDOWS'));
} else {
$this->markTestIncomplete('Not known PHP_OS: ' . PHP_OS);
self::markTestIncomplete('Not known PHP_OS: ' . PHP_OS);
}
} else {
$this->assertEquals(0, $this->object->get('PMA_IS_WINDOWS'));
self::assertEquals(0, $this->object->get('PMA_IS_WINDOWS'));
define('PHP_OS', 'Windows');
$this->assertTrue($this->object->get('PMA_IS_WINDOWS'));
self::assertTrue($this->object->get('PMA_IS_WINDOWS'));
}
}
@ -351,11 +351,11 @@ PHP;
$object = new Config();
$settings = new Settings([]);
$config = $settings->asArray();
$this->assertIsArray($config['Servers']);
$this->assertEquals($settings, $object->getSettings());
$this->assertEquals($config, $object->default);
$this->assertSame($config, $object->settings);
$this->assertSame($config, $object->baseSettings);
self::assertIsArray($config['Servers']);
self::assertEquals($settings, $object->getSettings());
self::assertEquals($config, $object->default);
self::assertSame($config, $object->settings);
self::assertSame($config, $object->baseSettings);
}
/**
@ -364,13 +364,13 @@ PHP;
public function testCheckConfigSource(): void
{
$this->object->setSource('unexisted.config.php');
$this->assertFalse($this->object->checkConfigSource());
$this->assertEquals(0, $this->object->sourceMtime);
self::assertFalse($this->object->checkConfigSource());
self::assertEquals(0, $this->object->sourceMtime);
$this->object->setSource(TEST_PATH . 'tests/test_data/config.inc.php');
$this->assertNotEmpty($this->object->getSource());
$this->assertTrue($this->object->checkConfigSource());
self::assertNotEmpty($this->object->getSource());
self::assertTrue($this->object->checkConfigSource());
}
/**
@ -378,11 +378,11 @@ PHP;
*/
public function testGetAndSet(): void
{
$this->assertNull($this->object->get('unresisting_setting'));
self::assertNull($this->object->get('unresisting_setting'));
$this->object->set('test_setting', 'test_value');
$this->assertEquals('test_value', $this->object->get('test_setting'));
self::assertEquals('test_value', $this->object->get('test_setting'));
}
/**
@ -392,11 +392,11 @@ PHP;
{
echo $this->object->getSource();
$this->assertEmpty($this->object->getSource(), 'Source is null by default');
self::assertEmpty($this->object->getSource(), 'Source is null by default');
$this->object->setSource(ROOT_PATH . 'config.sample.inc.php');
$this->assertEquals(
self::assertEquals(
ROOT_PATH . 'config.sample.inc.php',
$this->object->getSource(),
'Cant set new source',
@ -444,7 +444,7 @@ PHP;
$this->object->set('is_https', null);
$this->object->set('PmaAbsoluteUri', $pmaAbsoluteUri);
$this->assertEquals($expected, $this->object->isHttps());
self::assertEquals($expected, $this->object->isHttps());
}
/**
@ -500,7 +500,7 @@ PHP;
$_SERVER['REQUEST_URI'] = '';
$_SERVER['PATH_INFO'] = '';
$this->object->set('PmaAbsoluteUri', $absolute);
$this->assertEquals($expected, $this->object->getRootPath());
self::assertEquals($expected, $this->object->getRootPath());
}
/**
@ -534,9 +534,9 @@ PHP;
public function testLoad(string $source, bool $result): void
{
if ($result) {
$this->assertTrue($this->object->load($source));
self::assertTrue($this->object->load($source));
} else {
$this->assertFalse($this->object->load($source));
self::assertFalse($this->object->load($source));
}
}
@ -560,12 +560,12 @@ PHP;
{
$this->object->setUserValue(null, 'lang', 'cs', 'en');
$this->object->setUserValue('TEST_COOKIE_USER_VAL', '', 'cfg_val_1');
$this->assertEquals(
self::assertEquals(
$this->object->getUserValue('TEST_COOKIE_USER_VAL', 'fail'),
'cfg_val_1',
);
$this->object->setUserValue(null, 'NavigationWidth', 300);
$this->assertSame($this->object->settings['NavigationWidth'], 300);
self::assertSame($this->object->settings['NavigationWidth'], 300);
}
/**
@ -573,7 +573,7 @@ PHP;
*/
public function testGetUserValue(): void
{
$this->assertEquals($this->object->getUserValue('test_val', 'val'), 'val');
self::assertEquals($this->object->getUserValue('test_val', 'val'), 'val');
}
/**
@ -584,15 +584,15 @@ PHP;
//load file permissions for the current permissions file
$perms = @fileperms($this->object->getSource());
//testing for permissions for no configuration file
$this->assertFalse($perms !== false && ($perms & 2));
self::assertFalse($perms !== false && ($perms & 2));
//load file permissions for the current permissions file
$perms = @fileperms($this->permTestObj->getSource());
if ($perms !== false && ($perms & 2)) {
$this->assertTrue((bool) $this->permTestObj->get('PMA_IS_WINDOWS'));
self::assertTrue((bool) $this->permTestObj->get('PMA_IS_WINDOWS'));
} else {
$this->assertFalse((bool) $this->permTestObj->get('PMA_IS_WINDOWS'));
self::assertFalse((bool) $this->permTestObj->get('PMA_IS_WINDOWS'));
}
}
@ -602,7 +602,7 @@ PHP;
public function testSetCookie(): void
{
$this->object->set('is_https', false);
$this->assertFalse(
self::assertFalse(
$this->object->setCookie(
'TEST_DEF_COOKIE',
'test_def_123',
@ -610,7 +610,7 @@ PHP;
),
);
$this->assertTrue(
self::assertTrue(
$this->object->setCookie(
'TEST_CONFIG_COOKIE',
'test_val_123',
@ -619,7 +619,7 @@ PHP;
),
);
$this->assertTrue(
self::assertTrue(
$this->object->setCookie(
'TEST_CONFIG_COOKIE',
'',
@ -628,7 +628,7 @@ PHP;
);
$_COOKIE['TEST_MANUAL_COOKIE'] = 'some_test_val';
$this->assertTrue(
self::assertTrue(
$this->object->setCookie(
'TEST_MANUAL_COOKIE',
'other',
@ -644,14 +644,14 @@ PHP;
public function testGetTempDir(): void
{
$dir = realpath(sys_get_temp_dir());
$this->assertNotFalse($dir);
$this->assertDirectoryExists($dir);
$this->assertDirectoryIsWritable($dir);
self::assertNotFalse($dir);
self::assertDirectoryExists($dir);
self::assertDirectoryIsWritable($dir);
(new ReflectionProperty(Config::class, 'tempDir'))->setValue(null, []);
$this->object->set('TempDir', $dir . DIRECTORY_SEPARATOR);
// Check no double slash is here
$this->assertEquals(
self::assertEquals(
$dir . DIRECTORY_SEPARATOR . 'upload',
$this->object->getTempDir('upload'),
);
@ -665,13 +665,13 @@ PHP;
public function testGetUploadTempDir(): void
{
$dir = realpath(sys_get_temp_dir());
$this->assertNotFalse($dir);
$this->assertDirectoryExists($dir);
$this->assertDirectoryIsWritable($dir);
self::assertNotFalse($dir);
self::assertDirectoryExists($dir);
self::assertDirectoryIsWritable($dir);
$this->object->set('TempDir', $dir . DIRECTORY_SEPARATOR);
$this->assertEquals(
self::assertEquals(
$this->object->getTempDir('upload'),
$this->object->getUploadTempDir(),
);
@ -690,19 +690,19 @@ PHP;
$config = new Config();
$config->config = new Settings(['Servers' => $settings, 'ServerDefault' => 1]);
$selectedServer = $config->selectServer($request);
$this->assertSame($expected, $selectedServer);
$this->assertGreaterThanOrEqual(0, $selectedServer);
$this->assertArrayHasKey('Server', $config->settings);
$this->assertSame($expected, $config->server);
self::assertSame($expected, $selectedServer);
self::assertGreaterThanOrEqual(0, $selectedServer);
self::assertArrayHasKey('Server', $config->settings);
self::assertSame($expected, $config->server);
if ($expected >= 1) {
$this->assertTrue($config->hasSelectedServer());
self::assertTrue($config->hasSelectedServer());
$expectedServer = $config->config->Servers[$expected]->asArray();
$this->assertSame($expectedServer, $config->settings['Server']);
$this->assertSame($expectedServer, $config->selectedServer);
self::assertSame($expectedServer, $config->settings['Server']);
self::assertSame($expectedServer, $config->selectedServer);
} else {
$this->assertFalse($config->hasSelectedServer());
$this->assertSame([], $config->settings['Server']);
$this->assertSame((new Server())->asArray(), $config->selectedServer);
self::assertFalse($config->hasSelectedServer());
self::assertSame([], $config->settings['Server']);
self::assertSame((new Server())->asArray(), $config->selectedServer);
}
}
@ -738,7 +738,7 @@ PHP;
public function testGetConnectionParams(array $serverCfg, ConnectionType $connectionType, array $expected): void
{
$result = Config::getConnectionParams(new Server($serverCfg), $connectionType);
$this->assertEquals(new Server($expected), $result);
self::assertEquals(new Server($expected), $result);
}
/**
@ -880,7 +880,7 @@ PHP;
): void {
$actual = Config::getConnectionParams(new Server(['host' => $host, 'port' => $port]), $connectionType);
$expected = new Server(['host' => $expectedHost, 'port' => $expectedPort]);
$this->assertEquals($expected, $actual);
self::assertEquals($expected, $actual);
}
/** @psalm-return iterable<string, array{ConnectionType, string, string, string, string}> */

View File

@ -22,7 +22,7 @@ class ConsoleTest extends AbstractTestCase
$relation = new Relation($dbi);
$bookmarkRepository = new BookmarkRepository($dbi, $relation);
$console = new Console($relation, new Template(), $bookmarkRepository);
$this->assertEquals(['console.js'], $console->getScripts());
self::assertEquals(['console.js'], $console->getScripts());
}
public function testSetAjax(): void
@ -33,10 +33,10 @@ class ConsoleTest extends AbstractTestCase
$bookmarkRepository = new BookmarkRepository($dbi, $relation);
$console = new Console($relation, new Template(), $bookmarkRepository);
$this->assertFalse($isAjax->getValue($console));
self::assertFalse($isAjax->getValue($console));
$console->setAjax(true);
$this->assertTrue($isAjax->getValue($console));
self::assertTrue($isAjax->getValue($console));
$console->setAjax(false);
$this->assertFalse($isAjax->getValue($console));
self::assertFalse($isAjax->getValue($console));
}
}

View File

@ -48,9 +48,9 @@ class AbstractControllerTest extends AbstractTestCase
$message .= '[br]';
$expected = Message::error($message)->getDisplay();
$this->assertFalse($controller->testCheckParameters(['param1', 'param2']));
$this->assertSame($expected, $response->getHTMLResult());
$this->assertSame(400, $response->getResponse()->getStatusCode());
self::assertFalse($controller->testCheckParameters(['param1', 'param2']));
self::assertSame($expected, $response->getHTMLResult());
self::assertSame(400, $response->getResponse()->getStatusCode());
}
public function testCheckParametersWithAllParameters(): void
@ -71,8 +71,8 @@ class AbstractControllerTest extends AbstractTestCase
$GLOBALS['param1'] = 'param1';
$GLOBALS['param2'] = 'param2';
$this->assertTrue($controller->testCheckParameters(['param1', 'param2']));
$this->assertSame(200, $response->getResponse()->getStatusCode());
self::assertTrue($controller->testCheckParameters(['param1', 'param2']));
self::assertSame(200, $response->getResponse()->getStatusCode());
}
public function testSendErrorResponseWithJson(): void
@ -90,10 +90,10 @@ class AbstractControllerTest extends AbstractTestCase
$controller->testSendErrorResponse('Error message.', 404);
$this->assertSame(404, $response->getResponse()->getStatusCode());
$this->assertFalse($response->hasSuccessState());
$this->assertSame('', $response->getHTMLResult());
$this->assertSame(['isErrorResponse' => true, 'message' => 'Error message.'], $response->getJSONResult());
self::assertSame(404, $response->getResponse()->getStatusCode());
self::assertFalse($response->hasSuccessState());
self::assertSame('', $response->getHTMLResult());
self::assertSame(['isErrorResponse' => true, 'message' => 'Error message.'], $response->getJSONResult());
}
public function testSendErrorResponseWithHtml(): void
@ -111,12 +111,12 @@ class AbstractControllerTest extends AbstractTestCase
$controller->testSendErrorResponse('Error message.', 404);
$this->assertSame(404, $response->getResponse()->getStatusCode());
$this->assertFalse($response->hasSuccessState());
$this->assertSame(
self::assertSame(404, $response->getResponse()->getStatusCode());
self::assertFalse($response->hasSuccessState());
self::assertSame(
Message::error('Error message.')->getDisplay(),
$response->getHTMLResult(),
);
$this->assertSame([], $response->getJSONResult());
self::assertSame([], $response->getJSONResult());
}
}

View File

@ -27,7 +27,7 @@ final class BrowseForeignersControllerTest extends AbstractTestCase
$config = Config::getInstance();
$config->selectedServer['DisableIS'] = true;
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([
['db', null, 'sakila'],
['table', null, 'film_actor'],
@ -165,6 +165,6 @@ HTML;
new Relation($dbi),
))($request);
$this->assertSame($expected, $response->getHTMLResult());
self::assertSame($expected, $response->getHTMLResult());
}
}

View File

@ -38,7 +38,7 @@ class CheckRelationsControllerTest extends AbstractTestCase
Current::$database = '';
Current::$table = '';
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([
['create_pmadb', null, null],
['fixall_pmadb', null, null],
@ -53,12 +53,12 @@ class CheckRelationsControllerTest extends AbstractTestCase
$actual = $response->getHTMLResult();
$this->assertStringContainsString('phpMyAdmin configuration storage', $actual);
$this->assertStringContainsString(
self::assertStringContainsString('phpMyAdmin configuration storage', $actual);
self::assertStringContainsString(
'Configuration of pmadb… <span class="text-danger"><strong>not OK</strong></span>',
$actual,
);
$this->assertStringContainsString(
self::assertStringContainsString(
'Create</a> a database named \'phpmyadmin\' and setup the phpMyAdmin configuration storage there.',
$actual,
);

View File

@ -18,15 +18,15 @@ class CollationConnectionControllerTest extends AbstractTestCase
{
public function testInvoke(): void
{
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([['collation_connection', null, 'utf8mb4_general_ci']]);
$response = $this->createMock(ResponseRenderer::class);
$response->expects($this->once())->method('redirect')
$response = self::createMock(ResponseRenderer::class);
$response->expects(self::once())->method('redirect')
->with('index.php?route=/' . Url::getCommonRaw([], '&'));
$config = $this->createMock(Config::class);
$config->expects($this->once())->method('setUserValue')
$config = self::createMock(Config::class);
$config->expects(self::once())->method('setUserValue')
->with(null, 'DefaultConnectionCollation', 'utf8mb4_general_ci', 'utf8mb4_unicode_ci');
(new CollationConnectionController(

View File

@ -25,7 +25,7 @@ class AddControllerTest extends AbstractTestCase
$dbi = $this->createDatabaseInterface();
DatabaseInterface::$instance = $dbi;
$response = new ResponseRenderer();
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([
['db', null, null],
['label', null, null],
@ -36,7 +36,7 @@ class AddControllerTest extends AbstractTestCase
$bookmarkRepository = new BookmarkRepository($dbi, $relation);
$controller = new AddController($response, new Template(), $bookmarkRepository);
$controller($request);
$this->assertSame(['message' => 'Incomplete params'], $response->getJSONResult());
self::assertSame(['message' => 'Incomplete params'], $response->getJSONResult());
}
public function testWithoutRelationParameters(): void
@ -46,7 +46,7 @@ class AddControllerTest extends AbstractTestCase
$dbi = $this->createDatabaseInterface();
DatabaseInterface::$instance = $dbi;
$response = new ResponseRenderer();
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([
['db', null, 'test'],
['label', null, 'test'],
@ -57,7 +57,7 @@ class AddControllerTest extends AbstractTestCase
$bookmarkRepository = new BookmarkRepository($dbi, $relation);
$controller = new AddController($response, new Template(), $bookmarkRepository);
$controller($request);
$this->assertSame(['message' => 'Failed'], $response->getJSONResult());
self::assertSame(['message' => 'Failed'], $response->getJSONResult());
}
public function testWithValidParameters(): void
@ -80,7 +80,7 @@ class AddControllerTest extends AbstractTestCase
$dbi = $this->createDatabaseInterface($dbiDummy);
DatabaseInterface::$instance = $dbi;
$response = new ResponseRenderer();
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([
['db', null, 'test_db'],
['label', null, 'test_label'],
@ -91,7 +91,7 @@ class AddControllerTest extends AbstractTestCase
$bookmarkRepository = new BookmarkRepository($dbi, $relation);
$controller = new AddController($response, new Template(), $bookmarkRepository);
$controller($request);
$this->assertSame(
self::assertSame(
[
'message' => 'Succeeded',
'data' => [

View File

@ -31,7 +31,7 @@ class RefreshControllerTest extends AbstractTestCase
$template,
new Console($relation, $template, $bookmarkRepository),
);
$controller($this->createStub(ServerRequest::class));
$this->assertSame(['console_message_bookmark' => ''], $response->getJSONResult());
$controller(self::createStub(ServerRequest::class));
self::assertSame(['console_message_bookmark' => ''], $response->getJSONResult());
}
}

View File

@ -187,7 +187,7 @@ final class EventsControllerTest extends AbstractTestCase
HTML;
// phpcs:enable
$this->assertSame($expected, $actual);
self::assertSame($expected, $actual);
}
public function testWithoutEvents(): void
@ -314,6 +314,6 @@ HTML;
HTML;
// phpcs:enable
$this->assertSame($expected, $actual);
self::assertSame($expected, $actual);
}
}

View File

@ -39,10 +39,10 @@ class TablesControllerTest extends AbstractTestCase
$responseRenderer = new ResponseRenderer();
$multiTableQueryController = new TablesController($responseRenderer, new Template(), $this->dbi);
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getQueryParam')->willReturn($_GET['tables'], $_GET['db']);
$multiTableQueryController($request);
$this->assertSame(
self::assertSame(
[
'foreignKeyConstrains' => [
[

View File

@ -58,11 +58,11 @@ class PrivilegesControllerTest extends AbstractTestCase
$privileges = [];
$serverPrivileges = $this->createMock(Privileges::class);
$serverPrivileges = self::createMock(Privileges::class);
$serverPrivileges->method('getAllPrivileges')
->willReturn($privileges);
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParam')->willReturnMap([['db', null, 'test_db']]);
$response = new ResponseRenderer();
@ -74,34 +74,34 @@ class PrivilegesControllerTest extends AbstractTestCase
))($request);
$actual = $response->getHTMLResult();
$this->assertStringContainsString(
self::assertStringContainsString(
Url::getCommon(['db' => Current::$database], ''),
$actual,
);
$this->assertStringContainsString(Current::$database, $actual);
self::assertStringContainsString(Current::$database, $actual);
$this->assertStringContainsString(
self::assertStringContainsString(
__('User'),
$actual,
);
$this->assertStringContainsString(
self::assertStringContainsString(
__('Host'),
$actual,
);
$this->assertStringContainsString(
self::assertStringContainsString(
__('Type'),
$actual,
);
$this->assertStringContainsString(
self::assertStringContainsString(
__('Privileges'),
$actual,
);
$this->assertStringContainsString(
self::assertStringContainsString(
__('Grant'),
$actual,
);
$this->assertStringContainsString(
self::assertStringContainsString(
__('Action'),
$actual,
);
@ -109,19 +109,19 @@ class PrivilegesControllerTest extends AbstractTestCase
public function testWithInvalidDatabaseName(): void
{
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParam')->willReturnMap([['db', null, '']]);
$response = new ResponseRenderer();
(new PrivilegesController(
$response,
new Template(),
$this->createStub(Privileges::class),
self::createStub(Privileges::class),
$this->createDatabaseInterface(),
))($request);
$actual = $response->getHTMLResult();
$this->assertStringContainsString('<div class="alert alert-danger" role="alert">', $actual);
$this->assertStringContainsString('The database name must be a non-empty string.', $actual);
self::assertStringContainsString('<div class="alert alert-danger" role="alert">', $actual);
self::assertStringContainsString('The database name must be a non-empty string.', $actual);
}
}

View File

@ -240,7 +240,7 @@ final class RoutinesControllerTest extends AbstractTestCase
HTML;
// phpcs:enable
$this->assertSame($expected, $actual);
self::assertSame($expected, $actual);
}
public function testWithoutRoutines(): void
@ -333,6 +333,6 @@ HTML;
HTML;
// phpcs:enable
$this->assertSame($expected, $actual);
self::assertSame($expected, $actual);
}
}

View File

@ -38,7 +38,7 @@ class RealRowCountControllerTest extends AbstractTestCase
(new RealRowCountController($response, new Template(), $dbi, new DbTableExists($dbi)))($request);
$json = $response->getJSONResult();
$this->assertEquals('4,079', $json['real_row_count']);
self::assertEquals('4,079', $json['real_row_count']);
$_REQUEST['real_row_count_all'] = 'on';
@ -50,7 +50,7 @@ class RealRowCountControllerTest extends AbstractTestCase
['table' => 'Country', 'row_count' => '239'],
['table' => 'CountryLanguage', 'row_count' => '984'],
];
$this->assertEquals($expected, $json['real_row_count_all']);
self::assertEquals($expected, $json['real_row_count_all']);
$dbiDummy->assertAllSelectsConsumed();
}

View File

@ -48,15 +48,15 @@ class StructureControllerTest extends AbstractTestCase
->disableOriginalConstructor()
->getMock();
// Expect the table will have 6 rows
$table->expects($this->any())->method('getRealRowCountTable')
$table->expects(self::any())->method('getRealRowCountTable')
->willReturn(6);
$table->expects($this->any())->method('countRecords')
$table->expects(self::any())->method('countRecords')
->willReturn(6);
$dbi = $this->getMockBuilder(DatabaseInterface::class)
->disableOriginalConstructor()
->getMock();
$dbi->expects($this->any())->method('getTable')
$dbi->expects(self::any())->method('getTable')
->willReturn($table);
DatabaseInterface::$instance = $dbi;
@ -81,8 +81,8 @@ class StructureControllerTest extends AbstractTestCase
$this->relation,
$this->replication,
$dbi,
$this->createStub(TrackingChecker::class),
$this->createStub(PageSettings::class),
self::createStub(TrackingChecker::class),
self::createStub(PageSettings::class),
new DbTableExists($dbi),
);
// Showing statistics
@ -102,9 +102,9 @@ class StructureControllerTest extends AbstractTestCase
[$currentTable, 10],
);
$this->assertTrue($currentTable['COUNTED']);
$this->assertEquals(6, $currentTable['TABLE_ROWS']);
$this->assertEquals(16394, $sumSize);
self::assertTrue($currentTable['COUNTED']);
self::assertEquals(6, $currentTable['TABLE_ROWS']);
self::assertEquals(16394, $sumSize);
$currentTable['ENGINE'] = 'MYISAM';
[$currentTable, , , $sumSize] = $method->invokeArgs(
@ -112,8 +112,8 @@ class StructureControllerTest extends AbstractTestCase
[$currentTable, 10],
);
$this->assertFalse($currentTable['COUNTED']);
$this->assertEquals(16394, $sumSize);
self::assertFalse($currentTable['COUNTED']);
self::assertEquals(16394, $sumSize);
$controller = new StructureController(
$this->response,
@ -121,20 +121,20 @@ class StructureControllerTest extends AbstractTestCase
$this->relation,
$this->replication,
$dbi,
$this->createStub(TrackingChecker::class),
$this->createStub(PageSettings::class),
self::createStub(TrackingChecker::class),
self::createStub(PageSettings::class),
new DbTableExists($dbi),
);
$currentTable['ENGINE'] = 'InnoDB';
[$currentTable, , , $sumSize] = $method->invokeArgs($controller, [$currentTable, 10]);
$this->assertTrue($currentTable['COUNTED']);
$this->assertEquals(10, $sumSize);
self::assertTrue($currentTable['COUNTED']);
self::assertEquals(10, $sumSize);
$currentTable['ENGINE'] = 'MYISAM';
[$currentTable, , , $sumSize] = $method->invokeArgs($controller, [$currentTable, 10]);
$this->assertFalse($currentTable['COUNTED']);
$this->assertEquals(10, $sumSize);
self::assertFalse($currentTable['COUNTED']);
self::assertEquals(10, $sumSize);
}
/**
@ -152,8 +152,8 @@ class StructureControllerTest extends AbstractTestCase
$this->relation,
$this->replication,
$dbi,
$this->createStub(TrackingChecker::class),
$this->createStub(PageSettings::class),
self::createStub(TrackingChecker::class),
self::createStub(PageSettings::class),
new DbTableExists($dbi),
);
// Showing statistics
@ -167,16 +167,16 @@ class StructureControllerTest extends AbstractTestCase
$controller,
[$currentTable, 0, 0, 0, 0, 0, 0],
);
$this->assertEquals(6, $currentTable['Rows']);
$this->assertEquals(16384, $sumSize);
$this->assertEquals(300, $overheadSize);
self::assertEquals(6, $currentTable['Rows']);
self::assertEquals(16384, $sumSize);
self::assertEquals(300, $overheadSize);
unset($currentTable['Data_free']);
[$currentTable, , , , , $overheadSize] = $method->invokeArgs(
$controller,
[$currentTable, 0, 0, 0, 0, 0, 0],
);
$this->assertEquals(0, $overheadSize);
self::assertEquals(0, $overheadSize);
$controller = new StructureController(
$this->response,
@ -184,15 +184,15 @@ class StructureControllerTest extends AbstractTestCase
$this->relation,
$this->replication,
$dbi,
$this->createStub(TrackingChecker::class),
$this->createStub(PageSettings::class),
self::createStub(TrackingChecker::class),
self::createStub(PageSettings::class),
new DbTableExists($dbi),
);
[$currentTable, , , , , , $sumSize] = $method->invokeArgs(
$controller,
[$currentTable, 0, 0, 0, 0, 0, 0],
);
$this->assertEquals(0, $sumSize);
self::assertEquals(0, $sumSize);
$controller = new StructureController(
$this->response,
@ -200,15 +200,15 @@ class StructureControllerTest extends AbstractTestCase
$this->relation,
$this->replication,
$dbi,
$this->createStub(TrackingChecker::class),
$this->createStub(PageSettings::class),
self::createStub(TrackingChecker::class),
self::createStub(PageSettings::class),
new DbTableExists($dbi),
);
[$currentTable] = $method->invokeArgs(
$controller,
[$currentTable, 0, 0, 0, 0, 0, 0],
);
$this->assertArrayNotHasKey('Row', $currentTable);
self::assertArrayNotHasKey('Row', $currentTable);
}
/**
@ -226,25 +226,25 @@ class StructureControllerTest extends AbstractTestCase
$this->relation,
$this->replication,
$dbi,
$this->createStub(TrackingChecker::class),
$this->createStub(PageSettings::class),
self::createStub(TrackingChecker::class),
self::createStub(PageSettings::class),
new DbTableExists($dbi),
);
// When parameter $db is empty
$this->assertFalse(
self::assertFalse(
$method->invokeArgs($controller, [[], 'table']),
);
// Correct parameter
$tables = ['db.table'];
$this->assertTrue(
self::assertTrue(
$method->invokeArgs($controller, [$tables, 'table']),
);
// Table not in database
$tables = ['db.tab1e'];
$this->assertFalse(
self::assertFalse(
$method->invokeArgs($controller, [$tables, 'table']),
);
}
@ -262,8 +262,8 @@ class StructureControllerTest extends AbstractTestCase
$this->relation,
$this->replication,
$dbi,
$this->createStub(TrackingChecker::class),
$this->createStub(PageSettings::class),
self::createStub(TrackingChecker::class),
self::createStub(PageSettings::class),
new DbTableExists($dbi),
);
// Showing statistics
@ -280,8 +280,8 @@ class StructureControllerTest extends AbstractTestCase
$_REQUEST['db'] = 'my_unique_test_db';
$tablesProperty->setValue($controller, []);
$result = $method->invoke($controller, ['status' => false]);
$this->assertStringContainsString($_REQUEST['db'], $result);
$this->assertStringNotContainsString('id="overhead"', $result);
self::assertStringContainsString($_REQUEST['db'], $result);
self::assertStringNotContainsString('id="overhead"', $result);
//with table
$_REQUEST['db'] = 'my_unique_test_db';
@ -299,9 +299,9 @@ class StructureControllerTest extends AbstractTestCase
]);
$result = $method->invoke($controller, ['status' => false]);
$this->assertStringContainsString($_REQUEST['db'], $result);
$this->assertStringContainsString('id="overhead"', $result);
$this->assertStringContainsString('9.8', $result);
self::assertStringContainsString($_REQUEST['db'], $result);
self::assertStringContainsString('id="overhead"', $result);
self::assertStringContainsString('9.8', $result);
}
/**
@ -319,12 +319,12 @@ class StructureControllerTest extends AbstractTestCase
$this->relation,
$this->replication,
$dbi,
$this->createStub(TrackingChecker::class),
$this->createStub(PageSettings::class),
self::createStub(TrackingChecker::class),
self::createStub(PageSettings::class),
new DbTableExists($dbi),
);
$this->assertSame(
self::assertSame(
[[], '', '', 0],
$this->callFunction(
$structureController,
@ -340,10 +340,10 @@ class StructureControllerTest extends AbstractTestCase
$structureController,
StructureController::class,
'getDatabaseInfo',
[$this->createStub(ServerRequest::class)],
[self::createStub(ServerRequest::class)],
);
$this->assertSame(
self::assertSame(
[['Data_length' => 45, 'Index_length' => 60], '105', 'B', 105],
$this->callFunction(
$structureController,
@ -353,7 +353,7 @@ class StructureControllerTest extends AbstractTestCase
),
);
$this->assertSame(
self::assertSame(
[
['Data_length' => 45, 'Index_length' => 60],
'105',

View File

@ -199,8 +199,8 @@ SQL;
$exportController($request);
$output = $this->getActualOutputForAssertion();
$this->assertStringNotContainsString('Missing parameter: what', $output);
$this->assertStringNotContainsString('Missing parameter: export_type', $output);
$this->assertStringContainsString(htmlspecialchars($expectedOutput, ENT_COMPAT), $output);
self::assertStringNotContainsString('Missing parameter: what', $output);
self::assertStringNotContainsString('Missing parameter: export_type', $output);
self::assertStringContainsString(htmlspecialchars($expectedOutput, ENT_COMPAT), $output);
}
}

View File

@ -48,7 +48,7 @@ class CreateControllerTest extends AbstractTestCase
$response = new ResponseRenderer();
$template = new Template();
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([
['exportType', '', 'type'],
['templateName', '', 'name'],
@ -85,7 +85,7 @@ class CreateControllerTest extends AbstractTestCase
'selected_template' => null,
]);
$this->assertTrue($response->hasSuccessState());
$this->assertEquals(['data' => $options], $response->getJSONResult());
self::assertTrue($response->hasSuccessState());
self::assertEquals(['data' => $options], $response->getJSONResult());
}
}

View File

@ -37,7 +37,7 @@ class DeleteControllerTest extends AbstractTestCase
Config::getInstance()->selectedServer['user'] = 'user';
$response = new ResponseRenderer();
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturn('1');
(new DeleteController(
@ -47,6 +47,6 @@ class DeleteControllerTest extends AbstractTestCase
new Relation($this->dbi),
))($request);
$this->assertTrue($response->hasSuccessState());
self::assertTrue($response->hasSuccessState());
}
}

View File

@ -46,7 +46,7 @@ class LoadControllerTest extends AbstractTestCase
Config::getInstance()->selectedServer['user'] = 'user';
$response = new ResponseRenderer();
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturn('1');
(new LoadController(
@ -56,7 +56,7 @@ class LoadControllerTest extends AbstractTestCase
new Relation($this->dbi),
))($request);
$this->assertTrue($response->hasSuccessState());
$this->assertEquals(['data' => 'data1'], $response->getJSONResult());
self::assertTrue($response->hasSuccessState());
self::assertEquals(['data' => 'data1'], $response->getJSONResult());
}
}

View File

@ -37,7 +37,7 @@ class UpdateControllerTest extends AbstractTestCase
Config::getInstance()->selectedServer['user'] = 'user';
$response = new ResponseRenderer();
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([
['templateId', null, '1'],
['templateData', '', 'data'],
@ -50,6 +50,6 @@ class UpdateControllerTest extends AbstractTestCase
new Relation($this->dbi),
))($request);
$this->assertTrue($response->hasSuccessState());
self::assertTrue($response->hasSuccessState());
}
}

View File

@ -47,7 +47,7 @@ class GisDataEditorControllerTest extends AbstractTestCase
$value,
],
);
$this->assertEquals($expected, $gisData);
self::assertEquals($expected, $gisData);
}
/** @return iterable<array{0:mixed,1:string,2:string|null,3:string}> */

View File

@ -24,18 +24,18 @@ final class HomeControllerTest extends AbstractTestCase
$request = ServerRequestFactory::create()->createServerRequest('GET', 'http://example.com/')
->withQueryParams(['db' => 'test_db']);
$controller = new HomeController(
$this->createStub(ResponseRenderer::class),
$this->createStub(Template::class),
$this->createStub(Config::class),
$this->createStub(ThemeManager::class),
$this->createStub(DatabaseInterface::class),
self::createStub(ResponseRenderer::class),
self::createStub(Template::class),
self::createStub(Config::class),
self::createStub(ThemeManager::class),
self::createStub(DatabaseInterface::class),
ResponseFactory::create(),
);
$response = $controller($request);
$this->assertNotNull($response);
$this->assertSame(StatusCodeInterface::STATUS_FOUND, $response->getStatusCode());
$this->assertSame('./index.php?route=/database/structure&db=test_db', $response->getHeaderLine('Location'));
$this->assertSame('', (string) $response->getBody());
self::assertNotNull($response);
self::assertSame(StatusCodeInterface::STATUS_FOUND, $response->getStatusCode());
self::assertSame('./index.php?route=/database/structure&db=test_db', $response->getHeaderLine('Location'));
self::assertSame('', (string) $response->getBody());
}
public function testRedirectToTablePage(): void
@ -43,17 +43,17 @@ final class HomeControllerTest extends AbstractTestCase
$request = ServerRequestFactory::create()->createServerRequest('GET', 'http://example.com/')
->withQueryParams(['db' => 'test_db', 'table' => 'test_table']);
$controller = new HomeController(
$this->createStub(ResponseRenderer::class),
$this->createStub(Template::class),
$this->createStub(Config::class),
$this->createStub(ThemeManager::class),
$this->createStub(DatabaseInterface::class),
self::createStub(ResponseRenderer::class),
self::createStub(Template::class),
self::createStub(Config::class),
self::createStub(ThemeManager::class),
self::createStub(DatabaseInterface::class),
ResponseFactory::create(),
);
$response = $controller($request);
$this->assertNotNull($response);
$this->assertSame(StatusCodeInterface::STATUS_FOUND, $response->getStatusCode());
$this->assertSame('./index.php?route=/sql&db=test_db&table=test_table', $response->getHeaderLine('Location'));
$this->assertSame('', (string) $response->getBody());
self::assertNotNull($response);
self::assertSame(StatusCodeInterface::STATUS_FOUND, $response->getStatusCode());
self::assertSame('./index.php?route=/sql&db=test_db&table=test_table', $response->getHeaderLine('Location'));
self::assertSame('', (string) $response->getBody());
}
}

View File

@ -51,7 +51,7 @@ class ImportControllerTest extends AbstractTestCase
. 'FROM table1 A' . "\n"
. 'WHERE A.nomEtablissement = :nomEta AND foo = :1 AND `:a` IS NULL';
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([
['db', null, Current::$database],
['table', null, Current::$table],
@ -113,9 +113,9 @@ class ImportControllerTest extends AbstractTestCase
$output = $responseRenderer->getHTMLResult();
$this->assertStringContainsString('MySQL returned an empty result set (i.e. zero rows).', $output);
self::assertStringContainsString('MySQL returned an empty result set (i.e. zero rows).', $output);
$this->assertStringContainsString(
self::assertStringContainsString(
'SELECT A.*' . "\n" . 'FROM table1 A' . "\n"
. 'WHERE A.nomEtablissement = \'Saint-Louis - Châteaulin\' AND foo = 4 AND `:a` IS NULL',
$output,

View File

@ -23,16 +23,16 @@ class JavaScriptMessagesControllerTest extends TestCase
{
$response = (new JavaScriptMessagesController(ResponseFactory::create()))();
$actual = (string) $response->getBody();
$this->assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode());
self::assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode());
$this->assertStringStartsWith('window.Messages = {', $actual);
$this->assertStringEndsWith('};', $actual);
self::assertStringStartsWith('window.Messages = {', $actual);
self::assertStringEndsWith('};', $actual);
$json = substr($actual, strlen('window.Messages = '), -1);
$array = json_decode($json, true);
$this->assertIsArray($array);
$this->assertArrayHasKey('strDoYouReally', $array);
$this->assertEquals('Do you really want to execute "%s"?', $array['strDoYouReally']);
self::assertIsArray($array);
self::assertArrayHasKey('strDoYouReally', $array);
self::assertEquals('Do you really want to execute "%s"?', $array['strDoYouReally']);
}
}

View File

@ -28,20 +28,20 @@ class LintControllerTest extends AbstractTestCase
public function testWithoutParams(): void
{
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('isAjax')->willReturn(true);
$request->method('getParsedBodyParam')->willReturnMap([['sql_query', '', ''], ['options', null, null]]);
$this->getLintController()($request);
$output = $this->getActualOutputForAssertion();
$this->assertJson($output);
$this->assertJsonStringEqualsJsonString('[]', $output);
self::assertJson($output);
self::assertJsonStringEqualsJsonString('[]', $output);
}
public function testWithoutSqlErrors(): void
{
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('isAjax')->willReturn(true);
$request->method('getParsedBodyParam')->willReturnMap([
['sql_query', '', 'SELECT * FROM `actor` WHERE `actor_id` = 1;'],
@ -51,8 +51,8 @@ class LintControllerTest extends AbstractTestCase
$this->getLintController()($request);
$output = $this->getActualOutputForAssertion();
$this->assertJson($output);
$this->assertJsonStringEqualsJsonString('[]', $output);
self::assertJson($output);
self::assertJsonStringEqualsJsonString('[]', $output);
}
public function testWithSqlErrors(): void
@ -91,9 +91,9 @@ class LintControllerTest extends AbstractTestCase
'severity' => 'error',
],
]);
$this->assertNotFalse($expectedJson);
self::assertNotFalse($expectedJson);
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('isAjax')->willReturn(true);
$request->method('getParsedBodyParam')->willReturnMap([
['sql_query', '', 'SELECT * FROM `actor` WHEREE `actor_id` = 1'],
@ -103,8 +103,8 @@ class LintControllerTest extends AbstractTestCase
$this->getLintController()($request);
$output = $this->getActualOutputForAssertion();
$this->assertJson($output);
$this->assertJsonStringEqualsJsonString($expectedJson, $output);
self::assertJson($output);
self::assertJsonStringEqualsJsonString($expectedJson, $output);
}
private function getLintController(): LintController

View File

@ -18,13 +18,13 @@ class LogoutControllerTest extends AbstractTestCase
{
$GLOBALS['token_mismatch'] = false;
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('isPost')->willReturn(true);
$authPlugin = $this->createMock(AuthenticationPlugin::class);
$authPlugin->expects($this->once())->method('logOut');
$authPlugin = self::createMock(AuthenticationPlugin::class);
$authPlugin->expects(self::once())->method('logOut');
$factory = $this->createStub(AuthenticationPluginFactory::class);
$factory = self::createStub(AuthenticationPluginFactory::class);
$factory->method('create')->willReturn($authPlugin);
(new LogoutController($factory))($request);

View File

@ -135,19 +135,19 @@ class NavigationControllerTest extends AbstractTestCase
$_POST['full'] = '1';
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('isAjax')->willReturn(true);
$navigationController($request);
$this->assertTrue($responseRenderer->hasSuccessState(), 'expected the request not to fail');
self::assertTrue($responseRenderer->hasSuccessState(), 'expected the request not to fail');
$responseMessage = $responseRenderer->getJSONResult()['message'];
$this->assertStringContainsString('<div id=\'pma_navigation_tree_content\'>', $responseMessage);
self::assertStringContainsString('<div id=\'pma_navigation_tree_content\'>', $responseMessage);
// root.air-balloon_burner_dev2
// cm9vdA==.YWlyLWJhbGxvb25fYnVybmVyX2RldjI=
$this->assertStringContainsString(
self::assertStringContainsString(
'<div id=\'pma_navigation_tree_content\'>' . "\n"
. ' <ul>' . "\n"
. ' <li class="first database">' . "\n"
@ -289,15 +289,15 @@ class NavigationControllerTest extends AbstractTestCase
$_POST['full'] = '1';
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('isAjax')->willReturn(true);
$navigationController($request);
$this->assertTrue($responseRenderer->hasSuccessState(), 'expected the request not to fail');
self::assertTrue($responseRenderer->hasSuccessState(), 'expected the request not to fail');
$responseMessage = $responseRenderer->getJSONResult()['message'];
$this->assertStringContainsString('<div id=\'pma_navigation_tree_content\'>', $responseMessage);
self::assertStringContainsString('<div id=\'pma_navigation_tree_content\'>', $responseMessage);
$dbTemplate = ' <li class="database database">' . "\n"
. ' <div class="block">' . "\n"
@ -387,7 +387,7 @@ class NavigationControllerTest extends AbstractTestCase
// root.air-balloon_burner_dev2
// cm9vdA==.YWlyLWJhbGxvb25fYnVybmVyX2RldjI=
$this->assertStringContainsString(
self::assertStringContainsString(
'<div id=\'pma_navigation_tree_content\'>' . "\n"
. ' <ul>' . "\n"
. ' <li class="first navGroup">' . "\n"

View File

@ -40,8 +40,8 @@ class AddNewPrimaryControllerTest extends AbstractTestCase
$template,
new Normalization($dbi, new Relation($dbi), new Transformations(), $template),
);
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
$this->assertStringContainsString('<table id="table_columns"', $response->getHTMLResult());
self::assertStringContainsString('<table id="table_columns"', $response->getHTMLResult());
}
}

View File

@ -34,7 +34,7 @@ class CreateNewColumnControllerTest extends AbstractTestCase
DatabaseInterface::$instance = $dbi;
$response = new ResponseRenderer();
$template = new Template();
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([['numFields', null, '1']]);
$controller = new CreateNewColumnController(
@ -44,6 +44,6 @@ class CreateNewColumnControllerTest extends AbstractTestCase
);
$controller($request);
$this->assertStringContainsString('<table id="table_columns"', $response->getHTMLResult());
self::assertStringContainsString('<table id="table_columns"', $response->getHTMLResult());
}
}

View File

@ -36,7 +36,7 @@ class FirstStepControllerTest extends AbstractTestCase
DatabaseInterface::$instance = $dbi;
$response = new ResponseRenderer();
$template = new Template();
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([['normalizeTo', null, $normalizeTo]]);
$controller = new FirstStepController(
@ -47,22 +47,22 @@ class FirstStepControllerTest extends AbstractTestCase
$controller($request);
$files = $response->getHeader()->getScripts()->getFiles();
$this->assertTrue(
self::assertTrue(
in_array(['name' => 'normalization.js', 'fire' => 1], $files, true),
'normalization.js script was not included in the response.',
);
$this->assertTrue(
self::assertTrue(
in_array(['name' => 'vendor/jquery/jquery.uitablefilter.js', 'fire' => 0], $files, true),
'vendor/jquery/jquery.uitablefilter.js script was not included in the response.',
);
$output = $response->getHTMLResult();
$this->assertStringContainsString('First step of normalization (1NF)', $output);
$this->assertStringContainsString(
self::assertStringContainsString('First step of normalization (1NF)', $output);
self::assertStringContainsString(
'<div class="card" id="mainContent" data-normalizeto="' . $expectedNormalizeTo . '">',
$output,
);
$this->assertStringContainsString('<option value=\'no_such_col\'>No such column</option>', $output);
self::assertStringContainsString('<option value=\'no_such_col\'>No such column</option>', $output);
}
/** @return array<int, array{string|null, '1nf'|'2nf'|'3nf'}> */

View File

@ -37,10 +37,10 @@ class FourthStepControllerTest extends AbstractTestCase
$template,
new Normalization($dbi, new Relation($dbi), new Transformations(), $template),
);
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
// phpcs:disable Generic.Files.LineLength.TooLong
$this->assertSame([
self::assertSame([
'legendText' => 'Step 1.4 Remove redundant columns',
'headText' => 'Do you have a group of columns which on combining gives an existing column? For example, if you have first_name, last_name and full_name then combining first_name and last_name gives full_name which is redundant.',
'subText' => 'Check the columns which are redundant and click on remove. If no redundant column, click on \'No redundant column\'',

View File

@ -34,9 +34,9 @@ class SecondStepControllerTest extends AbstractTestCase
$template,
new Normalization($dbi, new Relation($dbi), new Transformations(), $template),
);
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
$this->assertSame([
self::assertSame([
'legendText' => 'Step 1.2 Have a primary key',
'headText' => 'Primary key already exists.',
'subText' => 'Taking you to next step…',

View File

@ -37,10 +37,10 @@ class ThirdStepControllerTest extends AbstractTestCase
$template,
new Normalization($dbi, new Relation($dbi), new Transformations(), $template),
);
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
// phpcs:disable Generic.Files.LineLength.TooLong
$this->assertSame([
self::assertSame([
'legendText' => 'Step 1.3 Move repeating groups',
'headText' => 'Do you have a group of two or more columns that are closely related and are all repeating the same attribute? For example, a table that holds data on books might have columns such as book_id, author1, author2, author3 and so on which form a repeating group. In this case a new table (book_id, author) should be created.',
'subText' => 'Check the columns which form a repeating group. If no such group, click on \'No repeating group\'',

View File

@ -37,10 +37,10 @@ class GetColumnsControllerTest extends AbstractTestCase
$template,
new Normalization($dbi, new Relation($dbi), new Transformations(), $template),
);
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
// phpcs:disable Generic.Files.LineLength.TooLong
$this->assertSame(
self::assertSame(
'<option selected disabled>Select one…</option><option value="no_such_col">No such column</option><option value="name">name [ varchar(20) ]</option>',
$response->getHTMLResult(),
);

View File

@ -44,29 +44,29 @@ class MainControllerTest extends AbstractTestCase
$response = new ResponseRenderer();
$controller = new MainController($response, new Template());
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
$files = $response->getHeader()->getScripts()->getFiles();
$this->assertTrue(
self::assertTrue(
in_array(['name' => 'normalization.js', 'fire' => 1], $files, true),
'normalization.js script was not included in the response.',
);
$this->assertTrue(
self::assertTrue(
in_array(['name' => 'vendor/jquery/jquery.uitablefilter.js', 'fire' => 0], $files, true),
'vendor/jquery/jquery.uitablefilter.js script was not included in the response.',
);
$output = $response->getHTMLResult();
$this->assertStringContainsString(
self::assertStringContainsString(
'<form method="post" action="index.php?route=/normalization/1nf/step1&lang=en"'
. ' name="normalize" id="normalizeTable"',
$output,
);
$this->assertStringContainsString('<input type="hidden" name="db" value="test_db">', $output);
$this->assertStringContainsString('<input type="hidden" name="table" value="test_table">', $output);
$this->assertStringContainsString('type="radio" name="normalizeTo"', $output);
$this->assertStringContainsString('id="normalizeToRadio1" value="1nf" checked>', $output);
$this->assertStringContainsString('id="normalizeToRadio2" value="2nf">', $output);
$this->assertStringContainsString('id="normalizeToRadio3" value="3nf">', $output);
self::assertStringContainsString('<input type="hidden" name="db" value="test_db">', $output);
self::assertStringContainsString('<input type="hidden" name="table" value="test_table">', $output);
self::assertStringContainsString('type="radio" name="normalizeTo"', $output);
self::assertStringContainsString('id="normalizeToRadio1" value="1nf" checked>', $output);
self::assertStringContainsString('id="normalizeToRadio2" value="2nf">', $output);
self::assertStringContainsString('id="normalizeToRadio3" value="3nf">', $output);
}
}

View File

@ -39,7 +39,7 @@ class MoveRepeatingGroupTest extends AbstractTestCase
DatabaseInterface::$instance = $dbi;
$response = new ResponseRenderer();
$template = new Template();
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([
['repeatingColumns', null, 'col1, col2'],
['newTable', null, 'new_table'],
@ -55,6 +55,6 @@ class MoveRepeatingGroupTest extends AbstractTestCase
$controller($request);
$message = Message::success('Selected repeating group has been moved to the table \'test_table\'');
$this->assertSame(['queryError' => false, 'message' => $message->getDisplay()], $response->getJSONResult());
self::assertSame(['queryError' => false, 'message' => $message->getDisplay()], $response->getJSONResult());
}
}

View File

@ -45,10 +45,10 @@ class PartialDependenciesControllerTest extends AbstractTestCase
$template,
new Normalization($dbi, new Relation($dbi), new Transformations(), $template),
);
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
// phpcs:disable Generic.Files.LineLength.TooLong
$this->assertSame(
self::assertSame(
'This list is based on a subset of the table\'s data and is not necessarily accurate. <div class="dependencies_box"><p class="d-block m-1">No partial dependencies found!</p></div>',
$response->getHTMLResult(),
);

View File

@ -36,7 +36,7 @@ class CreateNewTablesControllerTest extends AbstractTestCase
DatabaseInterface::$instance = $dbi;
$response = new ResponseRenderer();
$template = new Template();
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([
['pd', null, json_encode(['ID, task' => [], 'task' => ['timestamp']])],
['newTablesName', null, json_encode(['ID, task' => 'batch_log2', 'task' => 'table2'])],
@ -49,7 +49,7 @@ class CreateNewTablesControllerTest extends AbstractTestCase
);
$controller($request);
$this->assertSame([
self::assertSame([
'legendText' => 'End of step',
'headText' => '<h3>The second step of normalization is complete for table \'test_table\'.</h3>',
'queryError' => false,

View File

@ -34,9 +34,9 @@ class FirstStepControllerTest extends AbstractTestCase
$template,
new Normalization($dbi, new Relation($dbi), new Transformations(), $template),
);
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
$this->assertSame([
self::assertSame([
'legendText' => 'Step 2.1 Find partial dependencies',
'headText' => 'No partial dependencies possible as the primary key ( id ) has just one column.<br>',
'subText' => '',

View File

@ -30,7 +30,7 @@ class NewTablesControllerTest extends AbstractTestCase
DatabaseInterface::$instance = $dbi;
$response = new ResponseRenderer();
$template = new Template();
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([
['pd', null, json_encode(['ID, task' => [], 'task' => ['timestamp']])],
]);
@ -42,7 +42,7 @@ class NewTablesControllerTest extends AbstractTestCase
$controller($request);
// phpcs:disable Generic.Files.LineLength.TooLong
$this->assertSame(
self::assertSame(
'<p><b>In order to put the original table \'test_table\' into Second normal form we need to create the following tables:</b></p><p><input type="text" name="ID, task" value="test_table">( <u>ID, task</u> )<p><input type="text" name="task" value="table2">( <u>task</u>, timestamp )',
$response->getHTMLResult(),
);

View File

@ -53,7 +53,7 @@ class CreateNewTablesControllerTest extends AbstractTestCase
DatabaseInterface::$instance = $dbi;
$response = new ResponseRenderer();
$template = new Template();
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([['newTables', null, $newTables]]);
$controller = new CreateNewTablesController(
@ -63,7 +63,7 @@ class CreateNewTablesControllerTest extends AbstractTestCase
);
$controller($request);
$this->assertSame([
self::assertSame([
'legendText' => 'End of step',
'headText' => '<h3>The third step of normalization is complete.</h3>',
'queryError' => false,

View File

@ -31,7 +31,7 @@ class FirstStepControllerTest extends AbstractTestCase
DatabaseInterface::$instance = $dbi;
$response = new ResponseRenderer();
$template = new Template();
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([['tables', null, ['test_table']]]);
$controller = new FirstStepController(
@ -42,7 +42,7 @@ class FirstStepControllerTest extends AbstractTestCase
$controller($request);
// phpcs:disable Generic.Files.LineLength.TooLong
$this->assertSame([
self::assertSame([
'legendText' => 'Step 3.1 Find transitive dependencies',
'headText' => 'Please answer the following question(s) carefully to obtain a correct normalization.',
'subText' => 'For each column below, please select the <b>minimal set</b> of columns among given set whose values combined together are sufficient to determine the value of the column.<br>Note: A column may have no transitive dependency, in that case you don\'t have to select any.',

View File

@ -39,7 +39,7 @@ class NewTablesControllerTest extends AbstractTestCase
DatabaseInterface::$instance = $dbi;
$response = new ResponseRenderer();
$template = new Template();
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([['tables', null, $tables], ['pd', null, $pd]]);
$controller = new NewTablesController(
@ -50,7 +50,7 @@ class NewTablesControllerTest extends AbstractTestCase
$controller($request);
// phpcs:disable Generic.Files.LineLength.TooLong
$this->assertSame([
self::assertSame([
'html' => '<p><b>In order to put the original table \'test_table\' into Third normal form we need to create the following tables:</b></p><p><input type="text" name="test_table" value="test_table">( <u>event</u>, TypeOfEvent, period, Start_time, NameOfVenue, LocationOfVenue )<p><input type="text" name="table2" value="table2">( <u>NameOfVenue</u>, DateOfEvent )<p><input type="text" name="table3" value="table3">( <u>period</u>, NumberOfGuests )',
'newTables' => [
'test_table' => [

View File

@ -133,6 +133,6 @@ class TableControllerTest extends AbstractTestCase
);
$controller($request);
$this->assertEquals($expectedOutput, $responseRenderer->getHTMLResult());
self::assertEquals($expectedOutput, $responseRenderer->getHTMLResult());
}
}

View File

@ -21,9 +21,9 @@ class SchemaExportControllerTest extends AbstractTestCase
{
DatabaseInterface::$instance = $this->createDatabaseInterface();
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([['db', null, 'test_db'], ['export_type', null, 'svg']]);
$export = $this->createStub(Export::class);
$export = self::createStub(Export::class);
$export->method('getExportSchemaInfo')->willReturn([
'fileName' => 'file.svg',
'mediaType' => 'image/svg+xml',
@ -34,9 +34,9 @@ class SchemaExportControllerTest extends AbstractTestCase
$controller = new SchemaExportController($export, $response);
$controller($request);
$output = $this->getActualOutputForAssertion();
$this->assertSame('file data', $output);
$this->assertTrue($response->isDisabled());
$this->assertSame('', $response->getHTMLResult());
$this->assertSame([], $response->getJSONResult());
self::assertSame('file data', $output);
self::assertTrue($response->isDisabled());
self::assertSame('', $response->getHTMLResult());
self::assertSame([], $response->getJSONResult());
}
}

View File

@ -51,42 +51,42 @@ class BinlogControllerTest extends AbstractTestCase
$controller = new BinlogController($response, new Template(), DatabaseInterface::getInstance());
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([['log', null, 'index1'], ['pos', 0, '3']]);
$this->dummyDbi->addSelectDb('mysql');
$controller($request);
$this->dummyDbi->assertAllSelectsConsumed();
$actual = $response->getHTMLResult();
$this->assertStringContainsString('Select binary log to view', $actual);
$this->assertStringContainsString('<option value="index1" selected>', $actual);
$this->assertStringContainsString('<option value="index2">', $actual);
self::assertStringContainsString('Select binary log to view', $actual);
self::assertStringContainsString('<option value="index1" selected>', $actual);
self::assertStringContainsString('<option value="index2">', $actual);
$this->assertStringContainsString('Your SQL query has been executed successfully', $actual);
self::assertStringContainsString('Your SQL query has been executed successfully', $actual);
$this->assertStringContainsString("SHOW BINLOG EVENTS IN 'index1' LIMIT 3, 10", $actual);
self::assertStringContainsString("SHOW BINLOG EVENTS IN 'index1' LIMIT 3, 10", $actual);
$this->assertStringContainsString(
self::assertStringContainsString(
'<table class="table table-striped table-hover align-middle" id="binlogTable">',
$actual,
);
$urlNavigation = Url::getFromRoute('/server/binlog') . '" data-post="log=index1&pos=3&'
. 'is_full_query=1&server=1&';
$this->assertStringContainsString($urlNavigation, $actual);
$this->assertStringContainsString('title="Previous"', $actual);
self::assertStringContainsString($urlNavigation, $actual);
self::assertStringContainsString('title="Previous"', $actual);
$this->assertStringContainsString('Log name', $actual);
$this->assertStringContainsString('Position', $actual);
$this->assertStringContainsString('Event type', $actual);
$this->assertStringContainsString('Server ID', $actual);
$this->assertStringContainsString('Original position', $actual);
self::assertStringContainsString('Log name', $actual);
self::assertStringContainsString('Position', $actual);
self::assertStringContainsString('Event type', $actual);
self::assertStringContainsString('Server ID', $actual);
self::assertStringContainsString('Original position', $actual);
$this->assertStringContainsString('index1_Log_name', $actual);
$this->assertStringContainsString('index1_Pos', $actual);
$this->assertStringContainsString('index1_Event_type', $actual);
$this->assertStringContainsString('index1_Server_id', $actual);
$this->assertStringContainsString('index1_Orig_log_pos', $actual);
$this->assertStringContainsString('index1_Info', $actual);
self::assertStringContainsString('index1_Log_name', $actual);
self::assertStringContainsString('index1_Pos', $actual);
self::assertStringContainsString('index1_Event_type', $actual);
self::assertStringContainsString('index1_Server_id', $actual);
self::assertStringContainsString('index1_Orig_log_pos', $actual);
self::assertStringContainsString('index1_Info', $actual);
}
}

View File

@ -47,20 +47,20 @@ class CollationsControllerTest extends AbstractTestCase
$controller = new CollationsController($response, new Template(), DatabaseInterface::getInstance());
$this->dummyDbi->addSelectDb('mysql');
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
$this->dummyDbi->assertAllSelectsConsumed();
$actual = $response->getHTMLResult();
$this->assertStringContainsString('<div><strong>latin1</strong></div>', $actual);
$this->assertStringContainsString('<div>cp1252 West European</div>', $actual);
$this->assertStringContainsString('<div><strong>latin1_swedish_ci</strong></div>', $actual);
$this->assertStringContainsString('<div>Swedish, case-insensitive</div>', $actual);
$this->assertStringContainsString('<span class="badge bg-secondary text-dark">default</span>', $actual);
$this->assertStringContainsString('<div><strong>utf8</strong></div>', $actual);
$this->assertStringContainsString('<div>UTF-8 Unicode</div>', $actual);
$this->assertStringContainsString('<div><strong>utf8_bin</strong></div>', $actual);
$this->assertStringContainsString('<div>Unicode, binary</div>', $actual);
$this->assertStringContainsString('<div><strong>utf8_general_ci</strong></div>', $actual);
$this->assertStringContainsString('<div>Unicode, case-insensitive</div>', $actual);
self::assertStringContainsString('<div><strong>latin1</strong></div>', $actual);
self::assertStringContainsString('<div>cp1252 West European</div>', $actual);
self::assertStringContainsString('<div><strong>latin1_swedish_ci</strong></div>', $actual);
self::assertStringContainsString('<div>Swedish, case-insensitive</div>', $actual);
self::assertStringContainsString('<span class="badge bg-secondary text-dark">default</span>', $actual);
self::assertStringContainsString('<div><strong>utf8</strong></div>', $actual);
self::assertStringContainsString('<div>UTF-8 Unicode</div>', $actual);
self::assertStringContainsString('<div><strong>utf8_bin</strong></div>', $actual);
self::assertStringContainsString('<div>Unicode, binary</div>', $actual);
self::assertStringContainsString('<div><strong>utf8_general_ci</strong></div>', $actual);
self::assertStringContainsString('<div>Unicode, case-insensitive</div>', $actual);
}
}

View File

@ -45,7 +45,7 @@ final class CreateControllerTest extends AbstractTestCase
$template = new Template();
$controller = new CreateController($response, $template, $this->dbi);
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([
['new_db', null, 'test_db_error'],
['db_collation', null, null],
@ -54,14 +54,14 @@ final class CreateControllerTest extends AbstractTestCase
$controller($request);
$actual = $response->getJSONResult();
$this->assertArrayHasKey('message', $actual);
$this->assertStringContainsString('<div class="alert alert-danger" role="alert">', $actual['message']);
self::assertArrayHasKey('message', $actual);
self::assertStringContainsString('<div class="alert alert-danger" role="alert">', $actual['message']);
$response = new ResponseRenderer();
$controller = new CreateController($response, $template, $this->dbi);
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('isAjax')->willReturn(true);
$request->method('getParsedBodyParam')->willReturnMap([
['new_db', null, 'test_db'],
@ -71,9 +71,9 @@ final class CreateControllerTest extends AbstractTestCase
$controller($request);
$actual = $response->getJSONResult();
$this->assertArrayHasKey('message', $actual);
$this->assertStringContainsString('<div class="alert alert-success" role="alert">', $actual['message']);
$this->assertStringContainsString(
self::assertArrayHasKey('message', $actual);
self::assertStringContainsString('<div class="alert alert-success" role="alert">', $actual['message']);
self::assertStringContainsString(
sprintf(__('Database %1$s has been created.'), 'test_db'),
$actual['message'],
);

View File

@ -46,14 +46,14 @@ class DestroyControllerTest extends AbstractTestCase
new RelationCleanup($dbi, new Relation($dbi)),
);
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('isAjax')->willReturn(true);
$controller($request);
$actual = $response->getJSONResult();
$this->assertArrayHasKey('message', $actual);
$this->assertStringContainsString('<div class="alert alert-danger" role="alert">', $actual['message']);
$this->assertStringContainsString(__('No databases selected.'), $actual['message']);
self::assertArrayHasKey('message', $actual);
self::assertStringContainsString('<div class="alert alert-danger" role="alert">', $actual['message']);
self::assertStringContainsString(__('No databases selected.'), $actual['message']);
}
}

View File

@ -56,25 +56,25 @@ class DatabasesControllerTest extends AbstractTestCase
['SCHEMA_NAME'],
);
$this->dummyDbi->addSelectDb('mysql');
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
$this->dummyDbi->assertAllSelectsConsumed();
$actual = $response->getHTMLResult();
$this->assertStringContainsString('data-filter-row="SAKILA"', $actual);
$this->assertStringContainsString('sakila', $actual);
$this->assertStringContainsString('utf8_general_ci', $actual);
$this->assertStringContainsString('title="Unicode, case-insensitive"', $actual);
$this->assertStringContainsString('data-filter-row="SAKILA"', $actual);
$this->assertStringContainsString('employees', $actual);
$this->assertStringContainsString('latin1_swedish_ci', $actual);
$this->assertStringContainsString('title="Swedish, case-insensitive"', $actual);
$this->assertStringContainsString('<span id="filter-rows-count">2</span>', $actual);
$this->assertStringContainsString('name="pos" value="0"', $actual);
$this->assertStringContainsString('name="sort_by" value="SCHEMA_NAME"', $actual);
$this->assertStringContainsString('name="sort_order" value="asc"', $actual);
$this->assertStringContainsString(__('Enable statistics'), $actual);
$this->assertStringContainsString(__('No privileges to create databases'), $actual);
$this->assertStringNotContainsString(__('Indexes'), $actual);
self::assertStringContainsString('data-filter-row="SAKILA"', $actual);
self::assertStringContainsString('sakila', $actual);
self::assertStringContainsString('utf8_general_ci', $actual);
self::assertStringContainsString('title="Unicode, case-insensitive"', $actual);
self::assertStringContainsString('data-filter-row="SAKILA"', $actual);
self::assertStringContainsString('employees', $actual);
self::assertStringContainsString('latin1_swedish_ci', $actual);
self::assertStringContainsString('title="Swedish, case-insensitive"', $actual);
self::assertStringContainsString('<span id="filter-rows-count">2</span>', $actual);
self::assertStringContainsString('name="pos" value="0"', $actual);
self::assertStringContainsString('name="sort_by" value="SCHEMA_NAME"', $actual);
self::assertStringContainsString('name="sort_order" value="asc"', $actual);
self::assertStringContainsString(__('Enable statistics'), $actual);
self::assertStringContainsString(__('No privileges to create databases'), $actual);
self::assertStringNotContainsString(__('Indexes'), $actual);
$response = new ResponseRenderer();
@ -87,20 +87,20 @@ class DatabasesControllerTest extends AbstractTestCase
$_REQUEST['sort_order'] = 'desc';
$this->dummyDbi->addSelectDb('mysql');
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
$this->dummyDbi->assertAllSelectsConsumed();
$actual = $response->getHTMLResult();
$this->assertStringNotContainsString(__('Enable statistics'), $actual);
$this->assertStringContainsString(__('Indexes'), $actual);
$this->assertStringContainsString('name="sort_by" value="SCHEMA_TABLES"', $actual);
$this->assertStringContainsString('name="sort_order" value="desc"', $actual);
$this->assertStringContainsString('name="statistics" value="1"', $actual);
$this->assertStringContainsString('title="3912174"', $actual);
$this->assertStringContainsString('3,912,174', $actual);
$this->assertStringContainsString('title="4358144"', $actual);
$this->assertStringContainsString('4.2', $actual);
$this->assertStringContainsString('MiB', $actual);
$this->assertStringContainsString('name="db_collation"', $actual);
self::assertStringNotContainsString(__('Enable statistics'), $actual);
self::assertStringContainsString(__('Indexes'), $actual);
self::assertStringContainsString('name="sort_by" value="SCHEMA_TABLES"', $actual);
self::assertStringContainsString('name="sort_order" value="desc"', $actual);
self::assertStringContainsString('name="statistics" value="1"', $actual);
self::assertStringContainsString('title="3912174"', $actual);
self::assertStringContainsString('3,912,174', $actual);
self::assertStringContainsString('title="4358144"', $actual);
self::assertStringContainsString('4.2', $actual);
self::assertStringContainsString('MiB', $actual);
self::assertStringContainsString('name="db_collation"', $actual);
}
}

View File

@ -47,20 +47,20 @@ class EnginesControllerTest extends AbstractTestCase
$controller = new EnginesController($response, new Template(), DatabaseInterface::getInstance());
$this->dummyDbi->addSelectDb('mysql');
$controller->__invoke($this->createStub(ServerRequest::class));
$controller->__invoke(self::createStub(ServerRequest::class));
$this->dummyDbi->assertAllSelectsConsumed();
$actual = $response->getHTMLResult();
$this->assertStringContainsString('<th scope="col">Storage Engine</th>', $actual);
$this->assertStringContainsString('<th scope="col">Description</th>', $actual);
self::assertStringContainsString('<th scope="col">Storage Engine</th>', $actual);
self::assertStringContainsString('<th scope="col">Description</th>', $actual);
$this->assertStringContainsString('<td>Federated MySQL storage engine</td>', $actual);
$this->assertStringContainsString('FEDERATED', $actual);
$this->assertStringContainsString('index.php?route=/server/engines/FEDERATED', $actual);
self::assertStringContainsString('<td>Federated MySQL storage engine</td>', $actual);
self::assertStringContainsString('FEDERATED', $actual);
self::assertStringContainsString('index.php?route=/server/engines/FEDERATED', $actual);
$this->assertStringContainsString('<td>dummy comment</td>', $actual);
$this->assertStringContainsString('dummy', $actual);
$this->assertStringContainsString('index.php?route=/server/engines/dummy', $actual);
self::assertStringContainsString('<td>dummy comment</td>', $actual);
self::assertStringContainsString('dummy', $actual);
self::assertStringContainsString('index.php?route=/server/engines/dummy', $actual);
}
}

View File

@ -60,15 +60,15 @@ class PluginsControllerTest extends AbstractTestCase
'PLUGIN_STATUS' => 'ACTIVE',
];
$resultStub = $this->createMock(DummyResult::class);
$resultStub = self::createMock(DummyResult::class);
$dbi = $this->getMockBuilder(DatabaseInterface::class)
->disableOriginalConstructor()
->getMock();
$dbi->expects($this->once())
$dbi->expects(self::once())
->method('query')
->willReturn($resultStub);
$resultStub->expects($this->exactly(1))
$resultStub->expects(self::exactly(1))
->method('fetchAllAssoc')
->willReturn([$row]);
@ -76,22 +76,22 @@ class PluginsControllerTest extends AbstractTestCase
$controller = new PluginsController($response, new Template(), new Plugins($dbi), $this->dbi);
$this->dummyDbi->addSelectDb('mysql');
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
$this->dummyDbi->assertAllSelectsConsumed();
$actual = $response->getHTMLResult();
//validate 1:Items
$this->assertStringContainsString('<th scope="col">Plugin</th>', $actual);
$this->assertStringContainsString('<th scope="col">Description</th>', $actual);
$this->assertStringContainsString('<th scope="col">Version</th>', $actual);
$this->assertStringContainsString('<th scope="col">Author</th>', $actual);
$this->assertStringContainsString('<th scope="col">License</th>', $actual);
self::assertStringContainsString('<th scope="col">Plugin</th>', $actual);
self::assertStringContainsString('<th scope="col">Description</th>', $actual);
self::assertStringContainsString('<th scope="col">Version</th>', $actual);
self::assertStringContainsString('<th scope="col">Author</th>', $actual);
self::assertStringContainsString('<th scope="col">License</th>', $actual);
//validate 2: one Item HTML
$this->assertStringContainsString('plugin_name1', $actual);
$this->assertStringContainsString('<td>plugin_description1</td>', $actual);
$this->assertStringContainsString('<td>plugin_version1</td>', $actual);
$this->assertStringContainsString('<td>plugin_author1</td>', $actual);
$this->assertStringContainsString('<td>plugin_license1</td>', $actual);
self::assertStringContainsString('plugin_name1', $actual);
self::assertStringContainsString('<td>plugin_description1</td>', $actual);
self::assertStringContainsString('<td>plugin_version1</td>', $actual);
self::assertStringContainsString('<td>plugin_author1</td>', $actual);
self::assertStringContainsString('<td>plugin_license1</td>', $actual);
}
}

View File

@ -33,10 +33,10 @@ class AccountLockControllerTest extends AbstractTestCase
DatabaseInterface::$instance = $this->createDatabaseInterface();
$this->dbiStub = $this->createStub(DatabaseInterface::class);
$this->dbiStub = self::createStub(DatabaseInterface::class);
$this->dbiStub->method('isMariaDB')->willReturn(true);
$this->requestStub = $this->createStub(ServerRequest::class);
$this->requestStub = self::createStub(ServerRequest::class);
$this->requestStub->method('isAjax')->willReturn(true);
$this->requestStub->method('getParsedBodyParam')->willReturn('test.user', 'test.host');
@ -52,14 +52,14 @@ class AccountLockControllerTest extends AbstractTestCase
public function testWithValidAccount(): void
{
$this->dbiStub->method('getVersion')->willReturn(100402);
$this->dbiStub->method('tryQuery')->willReturn($this->createStub(DummyResult::class));
$this->dbiStub->method('tryQuery')->willReturn(self::createStub(DummyResult::class));
($this->controller)($this->requestStub);
$message = Message::success('The account test.user@test.host has been successfully locked.');
$this->assertEquals(200, $this->responseRendererStub->getResponse()->getStatusCode());
$this->assertTrue($this->responseRendererStub->hasSuccessState());
$this->assertEquals(['message' => $message->getDisplay()], $this->responseRendererStub->getJSONResult());
self::assertEquals(200, $this->responseRendererStub->getResponse()->getStatusCode());
self::assertTrue($this->responseRendererStub->hasSuccessState());
self::assertEquals(['message' => $message->getDisplay()], $this->responseRendererStub->getJSONResult());
}
public function testWithInvalidAccount(): void
@ -71,9 +71,9 @@ class AccountLockControllerTest extends AbstractTestCase
($this->controller)($this->requestStub);
$message = Message::error('Invalid account.');
$this->assertEquals(400, $this->responseRendererStub->getResponse()->getStatusCode());
$this->assertFalse($this->responseRendererStub->hasSuccessState());
$this->assertEquals(['message' => $message->getDisplay()], $this->responseRendererStub->getJSONResult());
self::assertEquals(400, $this->responseRendererStub->getResponse()->getStatusCode());
self::assertFalse($this->responseRendererStub->hasSuccessState());
self::assertEquals(['message' => $message->getDisplay()], $this->responseRendererStub->getJSONResult());
}
public function testWithUnsupportedServer(): void
@ -83,8 +83,8 @@ class AccountLockControllerTest extends AbstractTestCase
($this->controller)($this->requestStub);
$message = Message::error('Account locking is not supported.');
$this->assertEquals(400, $this->responseRendererStub->getResponse()->getStatusCode());
$this->assertFalse($this->responseRendererStub->hasSuccessState());
$this->assertEquals(['message' => $message->getDisplay()], $this->responseRendererStub->getJSONResult());
self::assertEquals(400, $this->responseRendererStub->getResponse()->getStatusCode());
self::assertFalse($this->responseRendererStub->hasSuccessState());
self::assertEquals(['message' => $message->getDisplay()], $this->responseRendererStub->getJSONResult());
}
}

View File

@ -33,10 +33,10 @@ class AccountUnlockControllerTest extends AbstractTestCase
DatabaseInterface::$instance = $this->createDatabaseInterface();
$this->dbiStub = $this->createStub(DatabaseInterface::class);
$this->dbiStub = self::createStub(DatabaseInterface::class);
$this->dbiStub->method('isMariaDB')->willReturn(true);
$this->requestStub = $this->createStub(ServerRequest::class);
$this->requestStub = self::createStub(ServerRequest::class);
$this->requestStub->method('isAjax')->willReturn(true);
$this->requestStub->method('getParsedBodyParam')->willReturn('test.user', 'test.host');
@ -52,14 +52,14 @@ class AccountUnlockControllerTest extends AbstractTestCase
public function testWithValidAccount(): void
{
$this->dbiStub->method('getVersion')->willReturn(100402);
$this->dbiStub->method('tryQuery')->willReturn($this->createStub(DummyResult::class));
$this->dbiStub->method('tryQuery')->willReturn(self::createStub(DummyResult::class));
($this->controller)($this->requestStub);
$message = Message::success('The account test.user@test.host has been successfully unlocked.');
$this->assertEquals(200, $this->responseRendererStub->getResponse()->getStatusCode());
$this->assertTrue($this->responseRendererStub->hasSuccessState());
$this->assertEquals(['message' => $message->getDisplay()], $this->responseRendererStub->getJSONResult());
self::assertEquals(200, $this->responseRendererStub->getResponse()->getStatusCode());
self::assertTrue($this->responseRendererStub->hasSuccessState());
self::assertEquals(['message' => $message->getDisplay()], $this->responseRendererStub->getJSONResult());
}
public function testWithInvalidAccount(): void
@ -71,9 +71,9 @@ class AccountUnlockControllerTest extends AbstractTestCase
($this->controller)($this->requestStub);
$message = Message::error('Invalid account.');
$this->assertEquals(400, $this->responseRendererStub->getResponse()->getStatusCode());
$this->assertFalse($this->responseRendererStub->hasSuccessState());
$this->assertEquals(['message' => $message->getDisplay()], $this->responseRendererStub->getJSONResult());
self::assertEquals(400, $this->responseRendererStub->getResponse()->getStatusCode());
self::assertFalse($this->responseRendererStub->hasSuccessState());
self::assertEquals(['message' => $message->getDisplay()], $this->responseRendererStub->getJSONResult());
}
public function testWithUnsupportedServer(): void
@ -83,8 +83,8 @@ class AccountUnlockControllerTest extends AbstractTestCase
($this->controller)($this->requestStub);
$message = Message::error('Account locking is not supported.');
$this->assertEquals(400, $this->responseRendererStub->getResponse()->getStatusCode());
$this->assertFalse($this->responseRendererStub->hasSuccessState());
$this->assertEquals(['message' => $message->getDisplay()], $this->responseRendererStub->getJSONResult());
self::assertEquals(400, $this->responseRendererStub->getResponse()->getStatusCode());
self::assertFalse($this->responseRendererStub->hasSuccessState());
self::assertEquals(['message' => $message->getDisplay()], $this->responseRendererStub->getJSONResult());
}
}

View File

@ -61,7 +61,7 @@ class PrivilegesControllerTest extends AbstractTestCase
);
// phpcs:enable
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([['old_username', '', ''], ['old_hostname', '', '']]);
@ -71,17 +71,17 @@ class PrivilegesControllerTest extends AbstractTestCase
(new PrivilegesController($response, new Template(), new Relation($this->dbi), $this->dbi))($request);
$actual = $response->getHTMLResult();
$this->assertStringContainsString('User accounts overview', $actual);
$this->assertStringContainsString(
self::assertStringContainsString('User accounts overview', $actual);
self::assertStringContainsString(
'id="checkbox_sel_users_1" value="pma&amp;amp;#27;localhost" name="selected_usr[]"',
$actual,
);
$this->assertStringContainsString('<code><dfn title="No privileges.">USAGE</dfn></code>', $actual);
$this->assertStringContainsString(
self::assertStringContainsString('<code><dfn title="No privileges.">USAGE</dfn></code>', $actual);
self::assertStringContainsString(
'id="checkbox_sel_users_2" value="root&amp;amp;#27;localhost" name="selected_usr[]"',
$actual,
);
$this->assertStringContainsString(
self::assertStringContainsString(
'<code><dfn title="Includes all privileges except GRANT.">ALL PRIVILEGES</dfn></code>',
$actual,
);

View File

@ -56,31 +56,31 @@ class ShowEngineControllerTest extends AbstractTestCase
$enginePlugin = StorageEngine::getEngine('Pbxt');
$this->assertStringContainsString(
self::assertStringContainsString(
htmlspecialchars($enginePlugin->getTitle()),
$actual,
);
$this->assertStringContainsString(
self::assertStringContainsString(
MySQLDocumentation::show($enginePlugin->getMysqlHelpPage()),
$actual,
);
$this->assertStringContainsString(
self::assertStringContainsString(
htmlspecialchars($enginePlugin->getComment()),
$actual,
);
$this->assertStringContainsString(
self::assertStringContainsString(
__('Variables'),
$actual,
);
$this->assertStringContainsString('index.php?route=/server/engines/Pbxt/Documentation', $actual);
$this->assertStringContainsString(
self::assertStringContainsString('index.php?route=/server/engines/Pbxt/Documentation', $actual);
self::assertStringContainsString(
$enginePlugin->getSupportInformationMessage(),
$actual,
);
$this->assertStringContainsString(
self::assertStringContainsString(
'There is no detailed status information available for this storage engine.',
$actual,
);

View File

@ -53,11 +53,11 @@ class AdvisorControllerTest extends AbstractTestCase
new Advisor(DatabaseInterface::getInstance(), new ExpressionLanguage()),
);
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
$expected = $this->template->render('server/status/advisor/index', ['data' => []]);
$this->assertSame(
self::assertSame(
$expected,
$this->response->getHTMLResult(),
);
@ -88,18 +88,18 @@ class AdvisorControllerTest extends AbstractTestCase
],
];
$advisor = $this->createMock(Advisor::class);
$advisor = self::createMock(Advisor::class);
$advisor->method('run')->willReturn($advisorData);
$this->data->dataLoaded = true;
$controller = new AdvisorController($this->response, $this->template, $this->data, $advisor);
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
$expected = $this->template->render('server/status/advisor/index', ['data' => $advisorData]);
$this->assertSame(
self::assertSame(
$expected,
$this->response->getHTMLResult(),
);

View File

@ -62,7 +62,7 @@ class GeneralLogControllerTest extends AbstractTestCase
$dbi,
);
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('isAjax')->willReturn(true);
$request->method('getParsedBodyParam')->willReturnMap([
['time_start', null, '0'],
@ -78,8 +78,8 @@ class GeneralLogControllerTest extends AbstractTestCase
$resultRows = [$value, $value2];
$resultSum = ['argument' => 10, 'TOTAL' => 21, 'argument3' => 11];
$this->assertEquals(2, $ret['message']['numRows']);
$this->assertEquals($resultRows, $ret['message']['rows']);
$this->assertEquals($resultSum, $ret['message']['sum']);
self::assertEquals(2, $ret['message']['numRows']);
self::assertEquals($resultRows, $ret['message']['rows']);
self::assertEquals($resultSum, $ret['message']['sum']);
}
}

View File

@ -65,7 +65,7 @@ class LogVarsControllerTest extends AbstractTestCase
$dbi,
);
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('isAjax')->willReturn(true);
$request->method('getParsedBodyParam')->willReturnMap([['varName', null, 'varName']]);
@ -74,6 +74,6 @@ class LogVarsControllerTest extends AbstractTestCase
$this->dummyDbi->assertAllSelectsConsumed();
$ret = $response->getJSONResult();
$this->assertEquals($value, $ret['message']);
self::assertEquals($value, $ret['message']);
}
}

View File

@ -45,7 +45,7 @@ class QueryAnalyzerControllerTest extends AbstractTestCase
$statusData = new Data($dbi, $config);
$controller = new QueryAnalyzerController($response, new Template(), $statusData, new Monitor($dbi), $dbi);
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('isAjax')->willReturn(true);
$request->method('getParsedBodyParam')->willReturnMap([['database', '', 'database'], ['query', '', 'query']]);
@ -55,12 +55,12 @@ class QueryAnalyzerControllerTest extends AbstractTestCase
$dummyDbi->assertAllSelectsConsumed();
$ret = $response->getJSONResult();
$this->assertEquals('cached_affected_rows', $ret['message']['affectedRows']);
$this->assertEquals(
self::assertEquals('cached_affected_rows', $ret['message']['affectedRows']);
self::assertEquals(
[],
$ret['message']['profiling'],
);
$this->assertEquals(
self::assertEquals(
[$value],
$ret['message']['explain'],
);

View File

@ -58,7 +58,7 @@ class SlowLogControllerTest extends AbstractTestCase
$dbi,
);
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('isAjax')->willReturn(true);
$request->method('getParsedBodyParam')->willReturnMap([['time_start', null, '0'], ['time_end', null, '10']]);
@ -69,8 +69,8 @@ class SlowLogControllerTest extends AbstractTestCase
$resultRows = [['sql_text' => 'insert sql_text', '#' => 11], ['sql_text' => 'update sql_text', '#' => 10]];
$resultSum = ['insert' => 11, 'TOTAL' => 21, 'update' => 10];
$this->assertEquals(2, $ret['message']['numRows']);
$this->assertEquals($resultRows, $ret['message']['rows']);
$this->assertEquals($resultSum, $ret['message']['sum']);
self::assertEquals(2, $ret['message']['numRows']);
self::assertEquals($resultRows, $ret['message']['rows']);
self::assertEquals($resultSum, $ret['message']['sum']);
}
}

View File

@ -58,43 +58,43 @@ class MonitorControllerTest extends AbstractTestCase
);
$this->dummyDbi->addSelectDb('mysql');
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
$this->dummyDbi->assertAllSelectsConsumed();
$html = $response->getHTMLResult();
$this->assertStringContainsString(__('Start monitor'), $html);
$this->assertStringContainsString(
self::assertStringContainsString(__('Start monitor'), $html);
self::assertStringContainsString(
__('Settings'),
$html,
);
$this->assertStringContainsString(
self::assertStringContainsString(
__('Done dragging (rearranging) charts'),
$html,
);
$this->assertStringContainsString('<div class="collapse" id="monitorSettingsContent">', $html);
$this->assertStringContainsString(
self::assertStringContainsString('<div class="collapse" id="monitorSettingsContent">', $html);
self::assertStringContainsString(
__('Enable charts dragging'),
$html,
);
$this->assertStringContainsString('<option>3</option>', $html);
self::assertStringContainsString('<option>3</option>', $html);
$this->assertStringContainsString(
self::assertStringContainsString(
__('Monitor Instructions'),
$html,
);
$this->assertStringContainsString('monitorInstructionsDialog', $html);
self::assertStringContainsString('monitorInstructionsDialog', $html);
$this->assertStringContainsString('<div class="modal fade" id="addChartModal"', $html);
$this->assertStringContainsString('<div id="chartVariableSettings">', $html);
$this->assertStringContainsString('<option>Processes</option>', $html);
$this->assertStringContainsString('<option>Connections</option>', $html);
self::assertStringContainsString('<div class="modal fade" id="addChartModal"', $html);
self::assertStringContainsString('<div id="chartVariableSettings">', $html);
self::assertStringContainsString('<option>Processes</option>', $html);
self::assertStringContainsString('<option>Connections</option>', $html);
$this->assertStringContainsString('<form id="js_data" class="hide">', $html);
$this->assertStringContainsString('<input type="hidden" name="server_time"', $html);
self::assertStringContainsString('<form id="js_data" class="hide">', $html);
self::assertStringContainsString('<input type="hidden" name="server_time"', $html);
//validate 2: inputs
$this->assertStringContainsString('<input type="hidden" name="is_superuser"', $html);
$this->assertStringContainsString('<input type="hidden" name="server_db_isLocal"', $html);
$this->assertStringContainsString('<div id="explain_docu" class="hide">', $html);
self::assertStringContainsString('<input type="hidden" name="is_superuser"', $html);
self::assertStringContainsString('<input type="hidden" name="server_db_isLocal"', $html);
self::assertStringContainsString('<div id="explain_docu" class="hide">', $html);
}
}

View File

@ -65,7 +65,7 @@ class RefreshControllerTest extends AbstractTestCase
new Processes(DatabaseInterface::getInstance()),
);
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('isAjax')->willReturn(true);
$request->method('getParsedBodyParam')->willReturnMap([
['column_name', '', ''],
@ -77,44 +77,44 @@ class RefreshControllerTest extends AbstractTestCase
$controller($request);
$html = $response->getHTMLResult();
$this->assertStringContainsString('index.php?route=/server/status/processes', $html);
self::assertStringContainsString('index.php?route=/server/status/processes', $html);
$killProcess = 'data-post="'
. Url::getCommon(['kill' => $process['Id']], '') . '"';
$this->assertStringContainsString($killProcess, $html);
$this->assertStringContainsString('ajax kill_process', $html);
$this->assertStringContainsString(
self::assertStringContainsString($killProcess, $html);
self::assertStringContainsString('ajax kill_process', $html);
self::assertStringContainsString(
__('Kill'),
$html,
);
//validate 2: $process['User']
$this->assertStringContainsString(
self::assertStringContainsString(
htmlspecialchars($process['User']),
$html,
);
//validate 3: $process['Host']
$this->assertStringContainsString(
self::assertStringContainsString(
htmlspecialchars($process['Host']),
$html,
);
//validate 4: $process['db']
$this->assertStringContainsString($process['Db'], $html);
self::assertStringContainsString($process['Db'], $html);
//validate 5: $process['Command']
$this->assertStringContainsString(
self::assertStringContainsString(
htmlspecialchars($process['Command']),
$html,
);
//validate 6: $process['Time']
$this->assertStringContainsString($process['Time'], $html);
self::assertStringContainsString($process['Time'], $html);
//validate 7: $process['state']
$this->assertStringContainsString($process['State'], $html);
self::assertStringContainsString($process['State'], $html);
//validate 8: $process['info']
$this->assertStringContainsString($process['Info'], $html);
self::assertStringContainsString($process['Info'], $html);
}
}

View File

@ -59,33 +59,33 @@ class ProcessesControllerTest extends AbstractTestCase
);
$this->dummyDbi->addSelectDb('mysql');
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
$this->dummyDbi->assertAllSelectsConsumed();
$html = $response->getHTMLResult();
$this->assertStringContainsString(
self::assertStringContainsString(
'Note: Enabling the auto refresh here might cause '
. 'heavy traffic between the web server and the MySQL server.',
$html,
);
// Test tab links
$this->assertStringContainsString('<div class="tabLinks row">', $html);
$this->assertStringContainsString('<a id="toggleRefresh" href="#">', $html);
$this->assertStringContainsString('play', $html);
$this->assertStringContainsString('Start auto refresh', $html);
$this->assertStringContainsString('<select id="id_refreshRate"', $html);
$this->assertStringContainsString('<option value="5" selected>', $html);
$this->assertStringContainsString('5 seconds', $html);
self::assertStringContainsString('<div class="tabLinks row">', $html);
self::assertStringContainsString('<a id="toggleRefresh" href="#">', $html);
self::assertStringContainsString('play', $html);
self::assertStringContainsString('Start auto refresh', $html);
self::assertStringContainsString('<select id="id_refreshRate"', $html);
self::assertStringContainsString('<option value="5" selected>', $html);
self::assertStringContainsString('5 seconds', $html);
$this->assertStringContainsString(
self::assertStringContainsString(
'<table id="tableprocesslist" class="table table-striped table-hover sortable w-auto">',
$html,
);
$this->assertStringContainsString('<th>Processes</th>', $html);
$this->assertStringContainsString('Show full queries', $html);
$this->assertStringContainsString('index.php?route=/server/status/processes', $html);
self::assertStringContainsString('<th>Processes</th>', $html);
self::assertStringContainsString('Show full queries', $html);
self::assertStringContainsString('index.php?route=/server/status/processes', $html);
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([
['column_name', '', 'Database'],
['order_by_field', '', 'Db'],
@ -98,11 +98,11 @@ class ProcessesControllerTest extends AbstractTestCase
$this->dummyDbi->assertAllSelectsConsumed();
$html = $response->getHTMLResult();
$this->assertStringContainsString('Truncate shown queries', $html);
$this->assertStringContainsString('Database', $html);
$this->assertStringContainsString('DESC', $html);
self::assertStringContainsString('Truncate shown queries', $html);
self::assertStringContainsString('Database', $html);
self::assertStringContainsString('DESC', $html);
$request = $this->createStub(ServerRequest::class);
$request = self::createStub(ServerRequest::class);
$request->method('getParsedBodyParam')->willReturnMap([
['column_name', '', 'Host'],
['order_by_field', '', 'Host'],
@ -115,7 +115,7 @@ class ProcessesControllerTest extends AbstractTestCase
$this->dummyDbi->assertAllSelectsConsumed();
$html = $response->getHTMLResult();
$this->assertStringContainsString('Host', $html);
$this->assertStringContainsString('ASC', $html);
self::assertStringContainsString('Host', $html);
self::assertStringContainsString('ASC', $html);
}
}

View File

@ -65,7 +65,7 @@ class QueriesControllerTest extends AbstractTestCase
$controller = new QueriesController($response, new Template(), $this->data, DatabaseInterface::getInstance());
$this->dummyDbi->addSelectDb('mysql');
$controller($this->createStub(ServerRequest::class));
$controller(self::createStub(ServerRequest::class));
$this->dummyDbi->assertAllSelectsConsumed();
$html = $response->getHTMLResult();
@ -75,26 +75,26 @@ class QueriesControllerTest extends AbstractTestCase
$questionsFromStart = __('Questions since startup:') . ' ' . Util::formatNumber($totalQueries, 0);
$this->assertStringContainsString('<h3>', $html);
$this->assertStringContainsString($questionsFromStart, $html);
self::assertStringContainsString('<h3>', $html);
self::assertStringContainsString($questionsFromStart, $html);
$this->assertStringContainsString('per hour:', $html);
$this->assertStringContainsString(Util::formatNumber($totalQueries * $hourFactor, 0), $html);
self::assertStringContainsString('per hour:', $html);
self::assertStringContainsString(Util::formatNumber($totalQueries * $hourFactor, 0), $html);
$valuePerMinute = Util::formatNumber($totalQueries * 60 / $this->data->status['Uptime'], 0);
$this->assertStringContainsString('per minute:', $html);
$this->assertStringContainsString(htmlspecialchars($valuePerMinute), $html);
self::assertStringContainsString('per minute:', $html);
self::assertStringContainsString(htmlspecialchars($valuePerMinute), $html);
$this->assertStringContainsString('Statements', $html);
self::assertStringContainsString('Statements', $html);
$this->assertStringContainsString('Change Db', $html);
$this->assertStringContainsString('54', $html);
$this->assertStringContainsString('Select', $html);
$this->assertStringContainsString('Set Option', $html);
$this->assertStringContainsString('Show Databases', $html);
$this->assertStringContainsString('Show Status', $html);
$this->assertStringContainsString('Show Tables', $html);
self::assertStringContainsString('Change Db', $html);
self::assertStringContainsString('54', $html);
self::assertStringContainsString('Select', $html);
self::assertStringContainsString('Set Option', $html);
self::assertStringContainsString('Show Databases', $html);
self::assertStringContainsString('Show Status', $html);
self::assertStringContainsString('Show Tables', $html);
$this->assertStringContainsString('<canvas id="query-statistics-chart" data-chart-data="', $html);
self::assertStringContainsString('<canvas id="query-statistics-chart" data-chart-data="', $html);
}
}

Some files were not shown because too many files have changed in this diff Show More