phpmyadmin/test/classes/config/DescriptionTest.php
Michal Čihař 0b81218a10 Refactor configuration descriptions into class
This avoids loading them all into global namespace on every request.

Issue #11731

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-05 14:44:05 +02:00

49 lines
981 B
PHP

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* tests for FormDisplay class in config folder
*
* @package PhpMyAdmin-test
*/
use PhpMyAdmin\Config\Descriptions;
require_once 'test/PMATestCase.php';
/**
* Tests for PMA_FormDisplay class
*
* @package PhpMyAdmin-test
*/
class DescriptionTest extends PMATestCase
{
/**
* @dataProvider getValues
*/
public function testGet($item, $type, $expected)
{
$this->assertEquals($expected, Descriptions::get($item, $type));
}
public function getValues()
{
return array(
array(
'AllowArbitraryServer',
'name',
'Allow login to any MySQL server',
),
array(
'UnknownSetting',
'name',
'UnknownSetting',
),
array(
'UnknownSetting',
'desc',
'',
),
);
}
}