Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
eb1e39f546
@ -12,13 +12,16 @@
|
||||
require_once 'libraries/CommonFunctions.class.php';
|
||||
require_once 'libraries/PDF.class.php';
|
||||
require_once 'libraries/php-gettext/gettext.inc';
|
||||
|
||||
if (!defined('PMA_VERSION')) {
|
||||
define('PMA_VERSION', 'TEST');
|
||||
}
|
||||
require_once 'libraries/core.lib.php';
|
||||
require_once 'libraries/Config.class.php';
|
||||
|
||||
class PMA_PDF_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
$GLOBALS['PMA_Config'] = new PMA_Config();
|
||||
$GLOBALS['PMA_Config']->enableBc();
|
||||
}
|
||||
/**
|
||||
* @group large
|
||||
*/
|
||||
|
||||
@ -12,10 +12,7 @@
|
||||
*/
|
||||
require_once 'libraries/core.lib.php';
|
||||
require_once 'libraries/CommonFunctions.class.php';
|
||||
|
||||
if (!defined('PMA_VERSION')) {
|
||||
define('PMA_VERSION', 'TEST');
|
||||
}
|
||||
require_once 'libraries/Config.class.php';
|
||||
|
||||
/**
|
||||
* Test for PMA_CommonFunctions::expandUserString function.
|
||||
@ -28,6 +25,8 @@ class PMA_expandUserString_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function setup()
|
||||
{
|
||||
$GLOBALS['PMA_Config'] = new PMA_Config();
|
||||
$GLOBALS['PMA_Config']->enableBc();
|
||||
$GLOBALS['cfg'] = array(
|
||||
'Server' => array(
|
||||
'host' => 'host&',
|
||||
@ -44,6 +43,7 @@ class PMA_expandUserString_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testExpand($in, $out)
|
||||
{
|
||||
$out = str_replace('PMA_VERSION', PMA_VERSION, $out);
|
||||
$this->assertEquals(
|
||||
$out, PMA_CommonFunctions::getInstance()->expandUserString($in)
|
||||
);
|
||||
@ -56,6 +56,7 @@ class PMA_expandUserString_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testExpandEscape($in, $out)
|
||||
{
|
||||
$out = str_replace('PMA_VERSION', PMA_VERSION, $out);
|
||||
$this->assertEquals(
|
||||
htmlspecialchars($out),
|
||||
PMA_CommonFunctions::getInstance()
|
||||
@ -76,7 +77,7 @@ class PMA_expandUserString_test extends PHPUnit_Framework_TestCase
|
||||
array('@DATABASE@', 'database'),
|
||||
array('@TABLE@', 'table'),
|
||||
array('@IGNORE@', '@IGNORE@'),
|
||||
array('@PHPMYADMIN@', 'phpMyAdmin ' . PMA_VERSION),
|
||||
array('@PHPMYADMIN@', 'phpMyAdmin PMA_VERSION'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user