add test case for Node_Function_container Index_container Procedure_container
This commit is contained in:
parent
57575a569a
commit
d169639704
37
test/classes/navigation/PMA_Node_Function_Container_test.php
Normal file
37
test/classes/navigation/PMA_Node_Function_Container_test.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* tests for NodeFactory class and Node_Column class
|
||||
*
|
||||
* @package PhpMyAdmin-test
|
||||
*/
|
||||
|
||||
require_once 'libraries/navigation/NodeFactory.class.php';
|
||||
require_once 'libraries/Util.class.php';
|
||||
require_once 'libraries/Theme.class.php';
|
||||
|
||||
|
||||
class Node_Function_Container_Test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['token'] = 'token';
|
||||
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
|
||||
}
|
||||
|
||||
public function testConstructor()
|
||||
{
|
||||
$parent = PMA_NodeFactory::getInstance('Node_Function_Container');
|
||||
$this->assertArrayHasKey(
|
||||
'text',
|
||||
$parent->links
|
||||
);
|
||||
$this->assertContains(
|
||||
'db_routines.php',
|
||||
$parent->links['text']
|
||||
);
|
||||
$this->assertEquals('functions', $parent->real_name);
|
||||
}
|
||||
}
|
||||
?>
|
||||
37
test/classes/navigation/PMA_Node_Index_Container_test.php
Normal file
37
test/classes/navigation/PMA_Node_Index_Container_test.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* tests for NodeFactory class and Node_Column class
|
||||
*
|
||||
* @package PhpMyAdmin-test
|
||||
*/
|
||||
|
||||
require_once 'libraries/navigation/NodeFactory.class.php';
|
||||
require_once 'libraries/Util.class.php';
|
||||
require_once 'libraries/Theme.class.php';
|
||||
|
||||
|
||||
class Node_Index_Container_Test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['token'] = 'token';
|
||||
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
|
||||
}
|
||||
|
||||
public function testConstructor()
|
||||
{
|
||||
$parent = PMA_NodeFactory::getInstance('Node_Index_Container');
|
||||
$this->assertArrayHasKey(
|
||||
'text',
|
||||
$parent->links
|
||||
);
|
||||
$this->assertContains(
|
||||
'tbl_indexes.php',
|
||||
$parent->links['text']
|
||||
);
|
||||
$this->assertEquals('indexes', $parent->real_name);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* tests for NodeFactory class and Node_Column class
|
||||
*
|
||||
* @package PhpMyAdmin-test
|
||||
*/
|
||||
|
||||
require_once 'libraries/navigation/NodeFactory.class.php';
|
||||
require_once 'libraries/Util.class.php';
|
||||
require_once 'libraries/Theme.class.php';
|
||||
|
||||
|
||||
class Node_Procedure_Container_Test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['token'] = 'token';
|
||||
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
|
||||
}
|
||||
|
||||
public function testConstructor()
|
||||
{
|
||||
$parent = PMA_NodeFactory::getInstance('Node_Procedure_Container');
|
||||
$this->assertArrayHasKey(
|
||||
'text',
|
||||
$parent->links
|
||||
);
|
||||
$this->assertContains(
|
||||
'db_routines.php',
|
||||
$parent->links['text']
|
||||
);
|
||||
$this->assertEquals('procedures', $parent->real_name);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user