Add PhpMyAdmin\Setup namespace
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
This commit is contained in:
parent
570e826155
commit
452bf6b2d0
@ -23,7 +23,8 @@
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PMA\\": "./",
|
||||
"PhpMyAdmin\\": "libraries/classes"
|
||||
"PhpMyAdmin\\": "libraries/classes",
|
||||
"PhpMyAdmin\\Setup\\": "setup/lib"
|
||||
}
|
||||
},
|
||||
"repositories": [
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
* @package PhpMyAdmin-Setup
|
||||
*/
|
||||
use PhpMyAdmin\Config\FormDisplay;
|
||||
use PMA\setup\lib\ConfigGenerator;
|
||||
use PhpMyAdmin\Setup\ConfigGenerator;
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Response;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
* @package PhpMyAdmin-Setup
|
||||
*/
|
||||
|
||||
use PMA\setup\lib\ConfigGenerator;
|
||||
use PhpMyAdmin\Setup\ConfigGenerator;
|
||||
use PhpMyAdmin\Core;
|
||||
|
||||
if (!defined('PHPMYADMIN')) {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin-Setup
|
||||
*/
|
||||
namespace PMA\setup\lib;
|
||||
namespace PhpMyAdmin\Setup;
|
||||
|
||||
use PhpMyAdmin\Config\ConfigFile;
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* @package PhpMyAdmin-Setup
|
||||
*/
|
||||
|
||||
use PhpMyAdmin\Config\Validator;
|
||||
use PhpMyAdmin\Core;
|
||||
|
||||
/**
|
||||
@ -14,7 +15,6 @@ use PhpMyAdmin\Core;
|
||||
require './lib/common.inc.php';
|
||||
|
||||
$validators = array();
|
||||
require './libraries/config/Validator.php';
|
||||
|
||||
Core::headerJSON();
|
||||
|
||||
@ -26,7 +26,7 @@ if (!($values instanceof stdClass)) {
|
||||
Core::fatalError(__('Wrong data'));
|
||||
}
|
||||
$values = (array)$values;
|
||||
$result = PhpMyAdmin\Config\Validator::validate($GLOBALS['ConfigFile'], $vids, $values, true);
|
||||
$result = Validator::validate($GLOBALS['ConfigFile'], $vids, $values, true);
|
||||
if ($result === false) {
|
||||
$result = sprintf(
|
||||
__('Wrong data or no validation for %s'),
|
||||
|
||||
@ -11,12 +11,12 @@
|
||||
*/
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\Config\ConfigFile;
|
||||
use PMA\setup\lib\ConfigGenerator;
|
||||
use PhpMyAdmin\Setup\ConfigGenerator;
|
||||
|
||||
require_once 'test/PMATestCase.php';
|
||||
|
||||
/**
|
||||
* Tests for PMA\setup\lib\ConfigGenerator
|
||||
* Tests for PhpMyAdmin\Setup\ConfigGenerator
|
||||
*
|
||||
* @package PhpMyAdmin-test
|
||||
*/
|
||||
@ -80,7 +80,7 @@ class ConfigGeneratorTest extends PMATestCase
|
||||
*/
|
||||
public function testGetVarExport()
|
||||
{
|
||||
$reflection = new \ReflectionClass('PMA\setup\lib\ConfigGenerator');
|
||||
$reflection = new \ReflectionClass('PhpMyAdmin\Setup\ConfigGenerator');
|
||||
$method = $reflection->getMethod('_getVarExport');
|
||||
$method->setAccessible(true);
|
||||
|
||||
@ -127,7 +127,7 @@ class ConfigGeneratorTest extends PMATestCase
|
||||
*/
|
||||
public function testIsZeroBasedArray()
|
||||
{
|
||||
$reflection = new \ReflectionClass('PMA\setup\lib\ConfigGenerator');
|
||||
$reflection = new \ReflectionClass('PhpMyAdmin\Setup\ConfigGenerator');
|
||||
$method = $reflection->getMethod('_isZeroBasedArray');
|
||||
$method->setAccessible(true);
|
||||
|
||||
@ -174,7 +174,7 @@ class ConfigGeneratorTest extends PMATestCase
|
||||
*/
|
||||
public function testExportZeroBasedArray()
|
||||
{
|
||||
$reflection = new \ReflectionClass('PMA\setup\lib\ConfigGenerator');
|
||||
$reflection = new \ReflectionClass('PhpMyAdmin\Setup\ConfigGenerator');
|
||||
$method = $reflection->getMethod('_exportZeroBasedArray');
|
||||
$method->setAccessible(true);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user