Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
8fbd84950c
@ -2,6 +2,9 @@
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
|
||||
require_once 'libraries/Theme.class.php';
|
||||
require_once 'libraries/Theme_Manager.class.php';
|
||||
require_once 'libraries/php-gettext/gettext.inc';
|
||||
require_once 'libraries/sqlparser.lib.php';
|
||||
|
||||
/**
|
||||
* Test class for PMA_Theme.
|
||||
|
||||
@ -244,5 +244,68 @@ class PMA_GIS_GeometryTest extends PHPUnit_Framework_TestCase
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param type $srid
|
||||
* @param type $scale_data
|
||||
* @param type $output
|
||||
* @dataProvider providerForTestGetBoundsForOl
|
||||
*/
|
||||
public function testGetBoundsForOl($srid, $scale_data, $output){
|
||||
|
||||
$this->assertEquals(
|
||||
$this->_callProtectedFunction(
|
||||
'getBoundsForOl',
|
||||
array($srid, $scale_data)
|
||||
),
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
public function providerForTestGetBoundsForOl() {
|
||||
return array(
|
||||
array(
|
||||
4326,
|
||||
array(
|
||||
'minX' => '0',
|
||||
'minY' => '0',
|
||||
'maxX' => '1',
|
||||
'maxY' => '1'
|
||||
),
|
||||
'bound = new OpenLayers.Bounds(); bound.extend(new OpenLayers.LonLat(0, 0).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject())); bound.extend(new OpenLayers.LonLat(1, 1).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()));'
|
||||
),
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param type $polygons
|
||||
* @param type $srid
|
||||
* @param type $output
|
||||
*
|
||||
*@dataProvider providerForTestGetPolygonArrayForOpenLayers
|
||||
*/
|
||||
public function testGetPolygonArrayForOpenLayers($polygons, $srid, $output){
|
||||
$this->assertEquals(
|
||||
$this->_callProtectedFunction(
|
||||
'getPolygonArrayForOpenLayers',
|
||||
array($polygons, $srid)
|
||||
),
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
public function providerForTestGetPolygonArrayForOpenLayers(){
|
||||
|
||||
return array(
|
||||
|
||||
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@ -16,6 +16,8 @@ require_once 'libraries/select_lang.lib.php';
|
||||
require_once 'libraries/core.lib.php';
|
||||
require_once 'libraries/sanitizing.lib.php';
|
||||
require_once 'libraries/Config.class.php';
|
||||
require_once 'libraries/vendor_config.php';
|
||||
require_once 'libraries/php-gettext/gettext.inc';
|
||||
|
||||
class PMA_fatalError_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
@ -15,6 +15,7 @@ require_once 'libraries/common.lib.php';
|
||||
require_once 'libraries/config.default.php';
|
||||
require_once 'libraries/Config.class.php';
|
||||
require_once 'libraries/database_interface.lib.php';
|
||||
require_once 'libraries/vendor_config.php';
|
||||
|
||||
require_once 'config.sample.inc.php';
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
* Include to test.
|
||||
*/
|
||||
require_once 'libraries/js_escape.lib.php';
|
||||
require_once 'libraries/common.lib.php';
|
||||
|
||||
class PMA_JS_Escape_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
@ -19,7 +20,15 @@ class PMA_JS_Escape_test extends PHPUnit_Framework_TestCase
|
||||
public function testFormat($key, $value, $expected)
|
||||
{
|
||||
$this->assertEquals($expected, PMA_getJsValue($key, $value));
|
||||
$this->assertEquals('foo = 100', PMA_getJsValue('foo', '100', false));
|
||||
$array = array('1','2','3');
|
||||
$this->assertEquals("foo = [\"1\",\"2\",\"3\",];\n", PMA_getJsValue('foo', $array));
|
||||
}
|
||||
|
||||
public function testPMA_jsFormat(){
|
||||
$this->assertEquals("`foo`", PMA_jsFormat('foo'));
|
||||
}
|
||||
|
||||
|
||||
public function variables()
|
||||
{
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin-test
|
||||
*/
|
||||
//require_once('gettext.php');
|
||||
require_once 'libraries/php-gettext/gettext.php';
|
||||
|
||||
class ParsingTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user