phpmyadmin/tests/unit/Html/MySQLDocumentationTest.php
Maurício Meneghini Fauth 606f66b5df
Rename tests/classes to tests/unit
This directory is for unit tests only, so let's rename it to unit to be
more clear.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-23 13:29:07 -03:00

27 lines
819 B
PHP

<?php
declare(strict_types=1);
namespace PhpMyAdmin\Tests\Html;
use PhpMyAdmin\Config;
use PhpMyAdmin\Html\MySQLDocumentation;
use PhpMyAdmin\Tests\AbstractTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
#[CoversClass(MySQLDocumentation::class)]
class MySQLDocumentationTest extends AbstractTestCase
{
public function testShowDocumentation(): void
{
Config::getInstance()->settings['ServerDefault'] = 1;
self::assertSame(
'<a href="index.php?route=/url&url=https%3A%2F%2Fdocs.phpmyadmin.net%2Fen'
. '%2Flatest%2Fpage.html%23anchor" target="documentation"><img src="themes/dot.gif"'
. ' title="Documentation" alt="Documentation" class="icon ic_b_help"></a>',
MySQLDocumentation::showDocumentation('page', 'anchor'),
);
}
}