Clean up of tests (#19067)
commit82c85d26c0076498336a108a9461aa5301e3d0bc
authorKamil Tekiela <tekiela246@gmail.com>
Wed, 20 Mar 2024 16:34:55 +0000 (20 17:34 +0100)
committerGitHub <noreply@github.com>
Wed, 20 Mar 2024 16:34:55 +0000 (20 13:34 -0300)
tree59f301be2ccea63ed1375668f87ce8f7717c493d
parent4edb2648a1ea69a1d9981a7e993d73cef3f4dae1
Clean up of tests (#19067)

* Fix wrong type hint

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Use $this instead of parent

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* setUp should be a protected method

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* onNotSuccessfulTest should be protected

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* $command doesn't need to be a property

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Give alertText() proper return type

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Use null-safe operator

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Call Message static constructors statically

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Call StorageEngine methods statically

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Add better type hints in PrivilegesController

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Use packed (without keys) arrays in tests

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Use type casts instead of function casts

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Use const instead of private property

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Use const instead of private property

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Fix testAuthFailsTooLongPass()

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Replace loop with array_shift

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Use ob_get_clean

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Remove duplicated code

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Use assert instead of phpdoc

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
---------

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
101 files changed:
phpstan-baseline.neon
psalm-baseline.xml
src/Server/Privileges.php
tests/end-to-end/TestBase.php
tests/unit/Advisory/AdvisorTest.php
tests/unit/CacheTest.php
tests/unit/Command/SetVersionCommandTest.php
tests/unit/Command/TwigLintCommandTest.php
tests/unit/Command/WriteGitRevisionCommandTest.php
tests/unit/Config/DescriptionTest.php
tests/unit/Config/FormDisplayTemplateTest.php
tests/unit/Config/FormDisplayTest.php
tests/unit/Config/FormTest.php
tests/unit/Config/Forms/FormListTest.php
tests/unit/Config/PageSettingsTest.php
tests/unit/Config/ServerConfigChecksTest.php
tests/unit/Config/Settings/SchemaTest.php
tests/unit/Config/SettingsTest.php
tests/unit/ConfigStorage/RelationTest.php
tests/unit/ConfigTest.php
tests/unit/Controllers/AbstractControllerTest.php
tests/unit/Controllers/Database/MultiTableQuery/TablesControllerTest.php
tests/unit/Controllers/Database/PrivilegesControllerTest.php
tests/unit/Controllers/Import/ImportControllerTest.php
tests/unit/Controllers/NavigationControllerTest.php
tests/unit/Controllers/Normalization/MainControllerTest.php
tests/unit/Controllers/Server/BinlogControllerTest.php
tests/unit/Controllers/Server/CollationsControllerTest.php
tests/unit/Controllers/Server/DatabasesControllerTest.php
tests/unit/Controllers/Server/EnginesControllerTest.php
tests/unit/Controllers/Server/PluginsControllerTest.php
tests/unit/Controllers/Server/ShowEngineControllerTest.php
tests/unit/Controllers/Server/Status/AdvisorControllerTest.php
tests/unit/Controllers/Server/Status/Monitor/GeneralLogControllerTest.php
tests/unit/Controllers/Server/Status/Monitor/LogVarsControllerTest.php
tests/unit/Controllers/Server/Status/Monitor/SlowLogControllerTest.php
tests/unit/Controllers/Server/Status/MonitorControllerTest.php
tests/unit/Controllers/Server/Status/Processes/RefreshControllerTest.php
tests/unit/Controllers/Server/Status/ProcessesControllerTest.php
tests/unit/Controllers/Server/Status/QueriesControllerTest.php
tests/unit/Controllers/Server/Status/StatusControllerTest.php
tests/unit/Controllers/Server/Status/VariablesControllerTest.php
tests/unit/Controllers/Server/VariablesControllerTest.php
tests/unit/Controllers/Table/PrivilegesControllerTest.php
tests/unit/Controllers/Table/ReplaceControllerTest.php
tests/unit/Controllers/Table/StructureControllerTest.php
tests/unit/Controllers/Transformation/OverviewControllerTest.php
tests/unit/CoreTest.php
tests/unit/Database/CentralColumnsTest.php
tests/unit/Database/EventsTest.php
tests/unit/Database/RoutinesTest.php
tests/unit/Display/ResultsTest.php
tests/unit/Engines/PbxtTest.php
tests/unit/Error/ErrorReportTest.php
tests/unit/Export/OptionsTest.php
tests/unit/FooterTest.php
tests/unit/Gis/Ds/PolygonTest.php
tests/unit/Gis/GisGeometryCollectionTest.php
tests/unit/Gis/GisGeometryTest.php
tests/unit/Gis/GisLineStringTest.php
tests/unit/Gis/GisMultiLineStringTest.php
tests/unit/Gis/GisMultiPointTest.php
tests/unit/Gis/GisMultiPolygonTest.php
tests/unit/Gis/GisPointTest.php
tests/unit/Gis/GisPolygonTest.php
tests/unit/GitTest.php
tests/unit/HeaderTest.php
tests/unit/Html/GeneratorTest.php
tests/unit/InsertEditTest.php
tests/unit/LinterTest.php
tests/unit/MessageTest.php
tests/unit/Navigation/NavigationTest.php
tests/unit/Navigation/NavigationTreeTest.php
tests/unit/Navigation/Nodes/NodeDatabaseChildTest.php
tests/unit/Navigation/Nodes/NodeTest.php
tests/unit/PdfTest.php
tests/unit/Plugins/Auth/AuthenticationConfigTest.php
tests/unit/Plugins/Auth/AuthenticationCookieTest.php
tests/unit/Plugins/Auth/AuthenticationHttpTest.php
tests/unit/Plugins/Auth/AuthenticationSignonTest.php
tests/unit/Plugins/Export/ExportCsvTest.php
tests/unit/Plugins/Transformations/TransformationPluginsTest.php
tests/unit/PluginsTest.php
tests/unit/SanitizeTest.php
tests/unit/Server/PrivilegesTest.php
tests/unit/Setup/ConfigGeneratorTest.php
tests/unit/Setup/FormProcessingTest.php
tests/unit/SqlQueryFormTest.php
tests/unit/SqlTest.php
tests/unit/StorageEngineTest.php
tests/unit/Stubs/DbiDummy.php
tests/unit/Theme/ThemeManagerTest.php
tests/unit/Theme/ThemeTest.php
tests/unit/TransformationsTest.php
tests/unit/Triggers/TriggersTest.php
tests/unit/TwoFactorTest.php
tests/unit/UrlTest.php
tests/unit/UserPasswordTest.php
tests/unit/UtilTest.php
tests/unit/Utils/HttpRequestTest.php
tests/unit/VersionInformationTest.php