From f3b79d83c07cc7deadb270da325e198a5ed295b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Fri, 4 Jun 2021 23:39:26 -0300 Subject: [PATCH] Add PHPUnit's Covers annotation on test classes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MaurĂ­cio Meneghini Fauth --- phpunit.xml.dist | 1 + test/classes/AdvisorTest.php | 3 ++ test/classes/BookmarkTest.php | 3 ++ test/classes/BrowseForeignersTest.php | 3 ++ test/classes/Charsets/CharsetTest.php | 3 ++ test/classes/Charsets/CollationTest.php | 3 ++ test/classes/CharsetsTest.php | 5 +- test/classes/CheckUserPrivilegesTest.php | 3 ++ .../classes/Command/SetVersionCommandTest.php | 3 ++ .../Command/WriteGitRevisionCommandTest.php | 3 ++ test/classes/Config/ConfigFileTest.php | 5 +- test/classes/Config/DescriptionTest.php | 3 ++ .../Config/FormDisplayTemplateTest.php | 5 +- test/classes/Config/FormDisplayTest.php | 3 ++ test/classes/Config/FormTest.php | 3 ++ test/classes/Config/Forms/FormListTest.php | 3 ++ test/classes/Config/PageSettingsTest.php | 6 +-- .../classes/Config/ServerConfigChecksTest.php | 3 ++ test/classes/ConfigTest.php | 3 ++ .../MultiTableQueryControllerTest.php | 3 ++ .../Database/PrivilegesControllerTest.php | 3 ++ .../Database/StructureControllerTest.php | 9 +--- .../ExportTemplateControllerTest.php | 3 ++ .../JavaScriptMessagesControllerTest.php | 3 ++ .../NormalizationControllerTest.php | 3 ++ .../Server/BinlogControllerTest.php | 3 ++ .../Server/CollationsControllerTest.php | 3 ++ .../Server/DatabasesControllerTest.php | 3 ++ .../Server/EnginesControllerTest.php | 3 ++ .../Server/PluginsControllerTest.php | 3 ++ .../Server/Status/AdvisorControllerTest.php | 3 ++ .../Server/Status/MonitorControllerTest.php | 3 ++ .../Server/Status/ProcessesControllerTest.php | 3 ++ .../Server/Status/QueriesControllerTest.php | 3 ++ .../Server/Status/StatusControllerTest.php | 3 ++ .../Server/Status/VariablesControllerTest.php | 3 ++ .../Server/VariablesControllerTest.php | 3 ++ .../Table/FindReplaceControllerTest.php | 3 ++ .../Table/IndexesControllerTest.php | 3 ++ .../Table/PrivilegesControllerTest.php | 3 ++ .../Table/RelationControllerTest.php | 3 ++ .../Table/ReplaceControllerTest.php | 3 ++ .../Table/SearchControllerTest.php | 5 +- .../Table/StructureControllerTest.php | 9 +--- .../TransformationOverviewControllerTest.php | 3 ++ test/classes/CoreTest.php | 3 ++ test/classes/CreateAddFieldTest.php | 2 +- test/classes/Database/CentralColumnsTest.php | 3 ++ test/classes/Database/Designer/CommonTest.php | 3 ++ test/classes/Database/DesignerTest.php | 3 ++ test/classes/Database/EventsTest.php | 3 ++ test/classes/Database/QbeTest.php | 3 ++ test/classes/Database/RoutinesTest.php | 3 ++ test/classes/Database/SearchTest.php | 2 +- test/classes/Database/TriggersTest.php | 3 ++ test/classes/DatabaseInterfaceTest.php | 5 +- test/classes/Dbal/DatabaseNameTest.php | 3 ++ test/classes/Dbal/DbiDummyTest.php | 5 +- test/classes/Dbal/DbiMysqliTest.php | 3 ++ test/classes/Display/ResultsTest.php | 5 +- test/classes/EncodingTest.php | 5 +- test/classes/Engines/BdbTest.php | 3 ++ test/classes/Engines/BinlogTest.php | 6 +-- test/classes/Engines/InnodbTest.php | 6 +-- test/classes/Engines/MemoryTest.php | 6 +-- test/classes/Engines/MrgMyisamTest.php | 3 ++ test/classes/Engines/MyisamTest.php | 6 +-- test/classes/Engines/NdbclusterTest.php | 6 +-- test/classes/Engines/PbxtTest.php | 6 +-- .../classes/Engines/PerformanceSchemaTest.php | 3 ++ test/classes/EnvironmentTest.php | 5 +- test/classes/ErrorHandlerTest.php | 6 +-- test/classes/ErrorReportTest.php | 4 +- test/classes/ErrorTest.php | 5 +- test/classes/Export/OptionsTest.php | 3 ++ test/classes/ExportTest.php | 5 +- test/classes/FieldMetadataTest.php | 3 ++ test/classes/FileListingTest.php | 3 ++ test/classes/FileTest.php | 3 ++ test/classes/FlashMessagesTest.php | 3 ++ test/classes/FontTest.php | 3 ++ test/classes/FooterTest.php | 3 ++ test/classes/Gis/GisFactoryTest.php | 3 ++ .../classes/Gis/GisGeometryCollectionTest.php | 3 ++ test/classes/Gis/GisGeometryTest.php | 3 ++ test/classes/Gis/GisLineStringTest.php | 3 ++ test/classes/Gis/GisMultiLineStringTest.php | 3 ++ test/classes/Gis/GisMultiPointTest.php | 3 ++ test/classes/Gis/GisMultiPolygonTest.php | 3 ++ test/classes/Gis/GisPointTest.php | 3 ++ test/classes/Gis/GisPolygonTest.php | 3 ++ test/classes/Gis/GisVisualizationTest.php | 3 ++ test/classes/GitTest.php | 1 + test/classes/HeaderTest.php | 1 + test/classes/Html/GeneratorTest.php | 8 ++- test/classes/Html/MySQLDocumentationTest.php | 6 +-- test/classes/Html/SecurityTest.php | 3 ++ test/classes/ImportTest.php | 2 +- test/classes/IndexTest.php | 3 ++ test/classes/InsertEditTest.php | 1 + test/classes/IpAllowDenyTest.php | 4 +- test/classes/LanguageTest.php | 5 ++ test/classes/LinterTest.php | 6 +-- test/classes/ListDatabaseTest.php | 3 ++ test/classes/MenuTest.php | 3 ++ test/classes/MessageTest.php | 3 ++ test/classes/MimeTest.php | 2 +- test/classes/Navigation/NavigationTest.php | 3 ++ .../classes/Navigation/NavigationTreeTest.php | 3 ++ test/classes/Navigation/NodeFactoryTest.php | 3 ++ .../Nodes/NodeColumnContainerTest.php | 3 ++ .../Navigation/Nodes/NodeColumnTest.php | 3 ++ .../Nodes/NodeDatabaseChildTest.php | 3 ++ .../Navigation/Nodes/NodeDatabaseTest.php | 3 ++ .../Nodes/NodeEventContainerTest.php | 3 ++ .../Navigation/Nodes/NodeEventTest.php | 3 ++ .../Nodes/NodeFunctionContainerTest.php | 3 ++ .../Navigation/Nodes/NodeFunctionTest.php | 3 ++ .../Nodes/NodeIndexContainerTest.php | 3 ++ .../Navigation/Nodes/NodeIndexTest.php | 3 ++ .../Nodes/NodeProcedureContainerTest.php | 3 ++ .../Navigation/Nodes/NodeProcedureTest.php | 3 ++ .../Nodes/NodeTableContainerTest.php | 3 ++ .../Navigation/Nodes/NodeTableTest.php | 3 ++ test/classes/Navigation/Nodes/NodeTest.php | 3 ++ .../Nodes/NodeTriggerContainerTest.php | 3 ++ .../Navigation/Nodes/NodeTriggerTest.php | 3 ++ .../Nodes/NodeViewContainerTest.php | 3 ++ .../classes/Navigation/Nodes/NodeViewTest.php | 3 ++ test/classes/NormalizationTest.php | 3 ++ test/classes/PdfTest.php | 3 ++ .../Plugins/Auth/AuthenticationConfigTest.php | 3 ++ .../Plugins/Auth/AuthenticationCookieTest.php | 3 ++ .../Plugins/Auth/AuthenticationHttpTest.php | 3 ++ .../Plugins/Auth/AuthenticationSignonTest.php | 3 ++ .../Plugins/Export/ExportCodegenTest.php | 1 + test/classes/Plugins/Export/ExportCsvTest.php | 1 + .../Plugins/Export/ExportExcelTest.php | 1 + .../Plugins/Export/ExportHtmlwordTest.php | 1 + .../classes/Plugins/Export/ExportJsonTest.php | 1 + .../Plugins/Export/ExportLatexTest.php | 1 + .../Plugins/Export/ExportMediawikiTest.php | 1 + test/classes/Plugins/Export/ExportOdsTest.php | 1 + test/classes/Plugins/Export/ExportOdtTest.php | 1 + test/classes/Plugins/Export/ExportPdfTest.php | 1 + .../Plugins/Export/ExportPhparrayTest.php | 1 + test/classes/Plugins/Export/ExportSqlTest.php | 1 + .../Plugins/Export/ExportTexytextTest.php | 1 + test/classes/Plugins/Export/ExportXmlTest.php | 1 + .../classes/Plugins/Export/ExportYamlTest.php | 1 + .../Export/Helpers/TablePropertyTest.php | 3 ++ test/classes/Plugins/Import/ImportCsvTest.php | 3 ++ test/classes/Plugins/Import/ImportLdiTest.php | 3 ++ .../Plugins/Import/ImportMediawikiTest.php | 3 ++ test/classes/Plugins/Import/ImportOdsTest.php | 1 + test/classes/Plugins/Import/ImportShpTest.php | 1 + test/classes/Plugins/Import/ImportSqlTest.php | 3 ++ test/classes/Plugins/Import/ImportXmlTest.php | 1 + .../Plugins/Schema/DiaRelationSchemaTest.php | 1 + .../Plugins/Schema/EpsRelationSchemaTest.php | 3 ++ .../Schema/ExportRelationSchemaTest.php | 3 ++ .../Plugins/Schema/PdfRelationSchemaTest.php | 3 ++ .../Plugins/Schema/SvgRelationSchemaTest.php | 1 + .../TransformationPluginsTest.php | 5 +- test/classes/ProfilingTest.php | 3 ++ .../Groups/OptionsPropertyMainGroupTest.php | 3 ++ .../Groups/OptionsPropertyRootGroupTest.php | 3 ++ .../Groups/OptionsPropertySubgroupTest.php | 3 ++ .../Options/Items/PropertyItemsTest.php | 3 ++ .../Options/OptionsPropertyGroupTest.php | 3 ++ .../Options/OptionsPropertyItemTest.php | 3 ++ .../Options/OptionsPropertyOneItemTest.php | 3 ++ .../Plugins/ExportPluginPropertiesTest.php | 3 ++ .../Plugins/ImportPluginPropertiesTest.php | 3 ++ .../Plugins/PluginPropertyItemTest.php | 3 ++ test/classes/Properties/PropertyItemTest.php | 3 ++ test/classes/Query/GeneratorTest.php | 3 ++ test/classes/RelationCleanupTest.php | 4 +- test/classes/RelationTest.php | 1 + test/classes/ReplicationGuiTest.php | 4 +- test/classes/RoutingTest.php | 3 ++ test/classes/SanitizeTest.php | 3 ++ test/classes/ScriptsTest.php | 5 +- test/classes/Server/PluginTest.php | 3 ++ test/classes/Server/PluginsTest.php | 3 ++ test/classes/Server/PrivilegesTest.php | 4 +- test/classes/Server/SelectTest.php | 4 +- test/classes/Server/SysInfo/SysInfoTest.php | 5 +- test/classes/Server/UserGroupsTest.php | 3 ++ test/classes/Setup/ConfigGeneratorTest.php | 6 +-- test/classes/Setup/FormProcessingTest.php | 5 +- test/classes/Setup/IndexTest.php | 3 ++ test/classes/SqlQueryFormTest.php | 4 +- test/classes/SqlTest.php | 3 ++ test/classes/StorageEngineTest.php | 5 +- test/classes/SystemDatabaseTest.php | 5 +- test/classes/Table/SearchTest.php | 3 ++ test/classes/TableTest.php | 6 +-- test/classes/TemplateTest.php | 3 ++ test/classes/ThemeManagerTest.php | 3 ++ test/classes/ThemeTest.php | 3 ++ test/classes/TrackerTest.php | 3 ++ test/classes/TrackingTest.php | 3 ++ test/classes/TransformationsTest.php | 5 +- test/classes/TwoFactorTest.php | 3 ++ test/classes/TypesTest.php | 5 +- test/classes/UrlTest.php | 3 ++ test/classes/UserPreferencesTest.php | 3 ++ test/classes/UtilTest.php | 49 ++----------------- test/classes/Utils/ForeignKeyTest.php | 3 ++ test/classes/Utils/FormatConverterTest.php | 3 ++ test/classes/Utils/GisTest.php | 3 ++ test/classes/Utils/HttpRequestTest.php | 3 ++ test/classes/Utils/SessionCacheTest.php | 3 ++ test/classes/VersionInformationTest.php | 3 ++ test/classes/VersionTest.php | 3 ++ test/classes/ZipExtensionTest.php | 6 +-- 217 files changed, 538 insertions(+), 208 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index a67dae2321..e4ef19a157 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,6 +2,7 @@ diff --git a/test/classes/AdvisorTest.php b/test/classes/AdvisorTest.php index 0d97b5b6ce..51b82cd830 100644 --- a/test/classes/AdvisorTest.php +++ b/test/classes/AdvisorTest.php @@ -7,6 +7,9 @@ namespace PhpMyAdmin\Tests; use PhpMyAdmin\Advisor; use Symfony\Component\ExpressionLanguage\ExpressionLanguage; +/** + * @covers \PhpMyAdmin\Advisor + */ class AdvisorTest extends AbstractTestCase { protected function setUp(): void diff --git a/test/classes/BookmarkTest.php b/test/classes/BookmarkTest.php index d5ba3b1c18..ee9dee94fd 100644 --- a/test/classes/BookmarkTest.php +++ b/test/classes/BookmarkTest.php @@ -6,6 +6,9 @@ namespace PhpMyAdmin\Tests; use PhpMyAdmin\Bookmark; +/** + * @covers \PhpMyAdmin\Bookmark + */ class BookmarkTest extends AbstractTestCase { /** diff --git a/test/classes/BrowseForeignersTest.php b/test/classes/BrowseForeignersTest.php index d951741254..17ba009dec 100644 --- a/test/classes/BrowseForeignersTest.php +++ b/test/classes/BrowseForeignersTest.php @@ -7,6 +7,9 @@ namespace PhpMyAdmin\Tests; use PhpMyAdmin\BrowseForeigners; use PhpMyAdmin\Template; +/** + * @covers \PhpMyAdmin\BrowseForeigners + */ class BrowseForeignersTest extends AbstractTestCase { /** @var BrowseForeigners */ diff --git a/test/classes/Charsets/CharsetTest.php b/test/classes/Charsets/CharsetTest.php index 28eac0c58f..93782260ae 100644 --- a/test/classes/Charsets/CharsetTest.php +++ b/test/classes/Charsets/CharsetTest.php @@ -7,6 +7,9 @@ namespace PhpMyAdmin\Tests\Charsets; use PhpMyAdmin\Charsets\Charset; use PhpMyAdmin\Tests\AbstractTestCase; +/** + * @covers \PhpMyAdmin\Charsets\Charset + */ class CharsetTest extends AbstractTestCase { public function testFromServer(): void diff --git a/test/classes/Charsets/CollationTest.php b/test/classes/Charsets/CollationTest.php index a88fba230f..e161410965 100644 --- a/test/classes/Charsets/CollationTest.php +++ b/test/classes/Charsets/CollationTest.php @@ -7,6 +7,9 @@ namespace PhpMyAdmin\Tests\Charsets; use PhpMyAdmin\Charsets\Collation; use PhpMyAdmin\Tests\AbstractTestCase; +/** + * @covers \PhpMyAdmin\Charsets\Collation + */ class CollationTest extends AbstractTestCase { public function testFromServer(): void diff --git a/test/classes/CharsetsTest.php b/test/classes/CharsetsTest.php index 57596dd7b5..f9b1bc61b1 100644 --- a/test/classes/CharsetsTest.php +++ b/test/classes/CharsetsTest.php @@ -1,7 +1,4 @@ assertEquals( diff --git a/test/classes/Html/MySQLDocumentationTest.php b/test/classes/Html/MySQLDocumentationTest.php index c4495bf666..9057667c5c 100644 --- a/test/classes/Html/MySQLDocumentationTest.php +++ b/test/classes/Html/MySQLDocumentationTest.php @@ -7,11 +7,11 @@ namespace PhpMyAdmin\Tests\Html; use PhpMyAdmin\Html\MySQLDocumentation; use PhpMyAdmin\Tests\AbstractTestCase; +/** + * @covers \PhpMyAdmin\Html\MySQLDocumentation + */ class MySQLDocumentationTest extends AbstractTestCase { - /** - * @covers \PhpMyAdmin\Html\MySQLDocumentation::showDocumentation - */ public function testShowDocumentation(): void { $GLOBALS['server'] = '99'; diff --git a/test/classes/Html/SecurityTest.php b/test/classes/Html/SecurityTest.php index 8ae19f66ee..ef7d56ff56 100644 --- a/test/classes/Html/SecurityTest.php +++ b/test/classes/Html/SecurityTest.php @@ -8,6 +8,9 @@ use PhpMyAdmin\Template; use PhpMyAdmin\Tests\AbstractTestCase; use PhpMyAdmin\Url; +/** + * @coversNothing + */ class SecurityTest extends AbstractTestCase { /** @var Template */ diff --git a/test/classes/ImportTest.php b/test/classes/ImportTest.php index adcf0ef939..00d765ba16 100644 --- a/test/classes/ImportTest.php +++ b/test/classes/ImportTest.php @@ -14,7 +14,7 @@ use function time; use const PHP_INT_MAX; /** - * Tests for import functions + * @covers \PhpMyAdmin\Import */ class ImportTest extends AbstractTestCase { diff --git a/test/classes/IndexTest.php b/test/classes/IndexTest.php index 04546ceb9f..4109fcda72 100644 --- a/test/classes/IndexTest.php +++ b/test/classes/IndexTest.php @@ -6,6 +6,9 @@ namespace PhpMyAdmin\Tests; use PhpMyAdmin\Index; +/** + * @covers \PhpMyAdmin\Index + */ class IndexTest extends AbstractTestCase { /** @var array */ diff --git a/test/classes/InsertEditTest.php b/test/classes/InsertEditTest.php index d45d2d77b4..96aefd9753 100644 --- a/test/classes/InsertEditTest.php +++ b/test/classes/InsertEditTest.php @@ -26,6 +26,7 @@ use const MYSQLI_TYPE_TIMESTAMP; use const MYSQLI_TYPE_TINY; /** + * @covers \PhpMyAdmin\InsertEdit * @group medium */ class InsertEditTest extends AbstractTestCase diff --git a/test/classes/IpAllowDenyTest.php b/test/classes/IpAllowDenyTest.php index b10de4d536..7c16ee6ecf 100644 --- a/test/classes/IpAllowDenyTest.php +++ b/test/classes/IpAllowDenyTest.php @@ -8,9 +8,7 @@ use PhpMyAdmin\Core; use PhpMyAdmin\IpAllowDeny; /** - * PhpMyAdmin\Tests\IpAllowDenyTest class - * - * this class is for testing PhpMyAdmin\IpAllowDeny + * @covers \PhpMyAdmin\IpAllowDeny */ class IpAllowDenyTest extends AbstractTestCase { diff --git a/test/classes/LanguageTest.php b/test/classes/LanguageTest.php index 93aa7ef00c..96bfefedbc 100644 --- a/test/classes/LanguageTest.php +++ b/test/classes/LanguageTest.php @@ -11,6 +11,11 @@ use function count; use function is_readable; use function strtolower; +/** + * @uses \PhpMyAdmin\LanguageManager + * + * @covers \PhpMyAdmin\Language + */ class LanguageTest extends AbstractTestCase { /** @var LanguageManager */ diff --git a/test/classes/LinterTest.php b/test/classes/LinterTest.php index f41e38b4d3..e00183a51f 100644 --- a/test/classes/LinterTest.php +++ b/test/classes/LinterTest.php @@ -1,7 +1,4 @@ assertEquals(16, strlen(Util::generateRandom(16))); } - /** - * Test clearing user cache - * - * @covers \PhpMyAdmin\Util::clearUserCache - */ public function testClearUserCache(): void { $GLOBALS['server'] = 'server'; @@ -342,11 +340,6 @@ class UtilTest extends AbstractTestCase ); } - /** - * Test for Util::checkParameters - * - * @covers \PhpMyAdmin\Util::checkParameters - */ public function testCheckParameterMissing(): void { parent::setGlobalConfig(); @@ -369,11 +362,6 @@ class UtilTest extends AbstractTestCase ); } - /** - * Test for Util::checkParameters - * - * @covers \PhpMyAdmin\Util::checkParameters - */ public function testCheckParameter(): void { parent::setGlobalConfig(); @@ -402,7 +390,6 @@ class UtilTest extends AbstractTestCase * @param string|null $bit Value * @param string $val Expected value * - * @covers \PhpMyAdmin\Util::convertBitDefaultValue * @dataProvider providerConvertBitDefaultValue */ public function testConvertBitDefaultValue(?string $bit, string $val): void @@ -505,7 +492,6 @@ class UtilTest extends AbstractTestCase * @param string $a Expected value * @param string $b String to escape * - * @covers \PhpMyAdmin\Util::escapeMysqlWildcards * @dataProvider providerUnEscapeMysqlWildcards */ public function testEscapeMysqlWildcards(string $a, string $b): void @@ -522,7 +508,6 @@ class UtilTest extends AbstractTestCase * @param string $a String to unescape * @param string $b Expected value * - * @covers \PhpMyAdmin\Util::unescapeMysqlWildcards * @dataProvider providerUnEscapeMysqlWildcards */ public function testUnescapeMysqlWildcards(string $a, string $b): void @@ -539,7 +524,6 @@ class UtilTest extends AbstractTestCase * @param string $in string to evaluate * @param string $out expected output * - * @covers \PhpMyAdmin\Util::expandUserString * @dataProvider providerExpandUserString */ public function testExpandUserString(string $in, string $out): void @@ -610,7 +594,6 @@ class UtilTest extends AbstractTestCase * @param string $in Column specification * @param array $out Expected value * - * @covers \PhpMyAdmin\Util::extractColumnSpec * @dataProvider providerExtractColumnSpec */ public function testExtractColumnSpec(string $in, array $out): void @@ -758,7 +741,6 @@ class UtilTest extends AbstractTestCase * @param int|string $size Size * @param int|float $expected Expected value (float on some cpu architectures) * - * @covers \PhpMyAdmin\Util::extractValueFromFormattedSize * @dataProvider providerExtractValueFromFormattedSize */ public function testExtractValueFromFormattedSize($size, $expected): void @@ -804,7 +786,6 @@ class UtilTest extends AbstractTestCase * @param int $c Number of decimals to retain * @param array $e Expected value * - * @covers \PhpMyAdmin\Util::formatByteDown * @dataProvider providerFormatByteDown */ public function testFormatByteDown($a, int $b, int $c, array $e): void @@ -972,7 +953,6 @@ class UtilTest extends AbstractTestCase * @param int $c Number of decimals to retain * @param string $d Expected value * - * @covers \PhpMyAdmin\Util::formatNumber * @dataProvider providerFormatNumber */ public function testFormatNumber($a, int $b, int $c, string $d): void @@ -1144,7 +1124,6 @@ class UtilTest extends AbstractTestCase * @param string $unit Unit * @param string $res Result * - * @covers \PhpMyAdmin\Util::getFormattedMaximumUploadSize * @dataProvider providerGetFormattedMaximumUploadSize */ public function testGetFormattedMaximumUploadSize($size, string $unit, string $res): void @@ -1207,7 +1186,6 @@ class UtilTest extends AbstractTestCase * @param string $target Target * @param string $result Expected value * - * @covers \PhpMyAdmin\Util::getTitleForTarget * @dataProvider providerGetTitleForTarget */ public function testGetTitleForTarget(string $target, string $result): void @@ -1262,7 +1240,6 @@ class UtilTest extends AbstractTestCase * @param string $tz Timezone to set * @param string $locale Locale to set * - * @covers \PhpMyAdmin\Util::localisedDate * @dataProvider providerLocalisedDate */ public function testLocalisedDate(int $a, string $b, string $e, string $tz, string $locale): void @@ -1399,7 +1376,6 @@ class UtilTest extends AbstractTestCase * @param int $a Timespan in seconds * @param string $e Expected output * - * @covers \PhpMyAdmin\Util::timespanFormat * @dataProvider providerTimespanFormat */ public function testTimespanFormat(int $a, string $e): void @@ -1442,7 +1418,6 @@ class UtilTest extends AbstractTestCase * @param int $b Length * @param string $e Expected output * - * @covers \PhpMyAdmin\Util::printableBitValue * @dataProvider providerPrintableBitValue */ public function testPrintableBitValue(int $a, int $b, string $e): void @@ -1480,7 +1455,6 @@ class UtilTest extends AbstractTestCase * @param string $param String * @param string $expected Expected output * - * @covers \PhpMyAdmin\Util::unQuote * @dataProvider providerUnQuote */ public function testUnQuote(string $param, string $expected): void @@ -1524,7 +1498,6 @@ class UtilTest extends AbstractTestCase * @param string $param String * @param string $expected Expected output * - * @covers \PhpMyAdmin\Util::unQuote * @dataProvider providerUnQuoteSelectedChar */ public function testUnQuoteSelectedChar(string $param, string $expected): void @@ -1568,7 +1541,6 @@ class UtilTest extends AbstractTestCase * @param string|array $a String * @param string|array $b Expected output * - * @covers \PhpMyAdmin\Util::backquote * @dataProvider providerBackquote */ public function testBackquote($a, $b): void @@ -1624,7 +1596,6 @@ class UtilTest extends AbstractTestCase * @param string|array $expectedNoneOutput Expected none output * @param string|array $expectedMssqlOutput Expected MSSQL output * - * @covers \PhpMyAdmin\Util::backquoteCompat * @dataProvider providerBackquoteCompat */ public function testBackquoteCompat($entry, $expectedNoneOutput, $expectedMssqlOutput): void @@ -1691,8 +1662,6 @@ class UtilTest extends AbstractTestCase /** * backquoteCompat test with forbidden words - * - * @covers \PhpMyAdmin\Util::backquote */ public function testBackquoteForbidenWords(): void { @@ -1717,7 +1686,6 @@ class UtilTest extends AbstractTestCase * @param string $a String * @param string $e Expected output * - * @covers \PhpMyAdmin\Util::userDir * @dataProvider providerUserDir */ public function testUserDir(string $a, string $e): void @@ -1752,7 +1720,6 @@ class UtilTest extends AbstractTestCase * @param string $a String * @param string $e Expected output * - * @covers \PhpMyAdmin\Util::duplicateFirstNewline * @dataProvider providerDuplicateFirstNewline */ public function testDuplicateFirstNewline(string $a, string $e): void @@ -1790,11 +1757,6 @@ class UtilTest extends AbstractTestCase ]; } - /** - * Test for Util::unsupportedDatatypes - * - * @covers \PhpMyAdmin\Util::unsupportedDatatypes - */ public function testUnsupportedDatatypes(): void { $no_support_types = []; @@ -1804,11 +1766,6 @@ class UtilTest extends AbstractTestCase ); } - /** - * Test for Util::getPageFromPosition - * - * @covers \PhpMyAdmin\Util::getPageFromPosition - */ public function testGetPageFromPosition(): void { $this->assertEquals(Util::getPageFromPosition(0, 1), 1); diff --git a/test/classes/Utils/ForeignKeyTest.php b/test/classes/Utils/ForeignKeyTest.php index db199f4636..e792de8985 100644 --- a/test/classes/Utils/ForeignKeyTest.php +++ b/test/classes/Utils/ForeignKeyTest.php @@ -8,6 +8,9 @@ use PhpMyAdmin\DatabaseInterface; use PhpMyAdmin\Tests\AbstractTestCase; use PhpMyAdmin\Utils\ForeignKey; +/** + * @covers \PhpMyAdmin\Utils\ForeignKey + */ class ForeignKeyTest extends AbstractTestCase { /** diff --git a/test/classes/Utils/FormatConverterTest.php b/test/classes/Utils/FormatConverterTest.php index 2f62b9e4b1..4d43fbc4a5 100644 --- a/test/classes/Utils/FormatConverterTest.php +++ b/test/classes/Utils/FormatConverterTest.php @@ -9,6 +9,9 @@ use PhpMyAdmin\Utils\FormatConverter; use function hex2bin; +/** + * @covers \PhpMyAdmin\Utils\FormatConverter + */ class FormatConverterTest extends AbstractTestCase { /** diff --git a/test/classes/Utils/GisTest.php b/test/classes/Utils/GisTest.php index a208e30f3d..022a84b110 100644 --- a/test/classes/Utils/GisTest.php +++ b/test/classes/Utils/GisTest.php @@ -10,6 +10,9 @@ use PhpMyAdmin\Utils\Gis; use function hex2bin; +/** + * @covers \PhpMyAdmin\Utils\Gis + */ class GisTest extends AbstractTestCase { /** diff --git a/test/classes/Utils/HttpRequestTest.php b/test/classes/Utils/HttpRequestTest.php index 18f60210b5..4aa8faea34 100644 --- a/test/classes/Utils/HttpRequestTest.php +++ b/test/classes/Utils/HttpRequestTest.php @@ -15,6 +15,9 @@ use function stripos; use const CURLOPT_CAINFO; use const CURLOPT_CAPATH; +/** + * @covers \PhpMyAdmin\Utils\HttpRequest + */ class HttpRequestTest extends AbstractTestCase { /** @var HttpRequest */ diff --git a/test/classes/Utils/SessionCacheTest.php b/test/classes/Utils/SessionCacheTest.php index f994db0dfa..efede762b7 100644 --- a/test/classes/Utils/SessionCacheTest.php +++ b/test/classes/Utils/SessionCacheTest.php @@ -7,6 +7,9 @@ namespace PhpMyAdmin\Tests\Utils; use PhpMyAdmin\Utils\SessionCache; use PHPUnit\Framework\TestCase; +/** + * @covers \PhpMyAdmin\Utils\SessionCache + */ class SessionCacheTest extends TestCase { public function testGet(): void diff --git a/test/classes/VersionInformationTest.php b/test/classes/VersionInformationTest.php index 2983289f13..c2569565c0 100644 --- a/test/classes/VersionInformationTest.php +++ b/test/classes/VersionInformationTest.php @@ -9,6 +9,9 @@ use stdClass; use function count; +/** + * @covers \PhpMyAdmin\VersionInformation + */ class VersionInformationTest extends AbstractTestCase { /** @var stdClass[] */ diff --git a/test/classes/VersionTest.php b/test/classes/VersionTest.php index 45fe54ea39..85e904af41 100644 --- a/test/classes/VersionTest.php +++ b/test/classes/VersionTest.php @@ -8,6 +8,9 @@ use PhpMyAdmin\Version; use function defined; +/** + * @covers \PhpMyAdmin\Version + */ class VersionTest extends AbstractTestCase { /** diff --git a/test/classes/ZipExtensionTest.php b/test/classes/ZipExtensionTest.php index a168033044..c5726b6cc1 100644 --- a/test/classes/ZipExtensionTest.php +++ b/test/classes/ZipExtensionTest.php @@ -1,7 +1,4 @@