phpmyadmin/test/classes/Html/MySQLDocumentationTest.php
William Desportes 49a6d6e8d0
Use AbstractTestCase instead of PmaTestCase for all tests not needing mockResponse
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-22 01:45:50 +02:00

35 lines
1005 B
PHP

<?php
/**
* Test for \PhpMyAdmin\Html\MySQLDocumentation class
*/
declare(strict_types=1);
namespace PhpMyAdmin\Tests\Html;
use PhpMyAdmin\Html\MySQLDocumentation;
use PhpMyAdmin\Tests\AbstractTestCase;
/**
* Test for \PhpMyAdmin\Html\MySQLDocumentation class
*/
class MySQLDocumentationTest extends AbstractTestCase
{
/**
* Test for \PhpMyAdmin\Html\MySQLDocumentation::showDocumentation
*
* @covers \PhpMyAdmin\Html\MySQLDocumentation::showDocumentation
*/
public function testShowDocumentation(): void
{
$GLOBALS['server'] = '99';
$GLOBALS['cfg']['ServerDefault'] = 1;
$this->assertEquals(
'<a href="./url.php?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')
);
}
}