Fix nodes load.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
This commit is contained in:
Hugues Peccatte 2015-09-06 15:26:35 +02:00
parent 3539b01740
commit 845a197e8a
3 changed files with 6 additions and 6 deletions

View File

@ -39,7 +39,7 @@ class NodeProcedureContainer extends NodeDatabaseChildContainer
$new_label = _pgettext('Create new procedure', 'New');
$new = NodeFactory::getInstance(
'PMA\libraries\navigation\nodes\Node',
'Node',
$new_label
);
$new->isNew = true;

View File

@ -67,7 +67,7 @@ class NodeFactory_Test extends PHPUnit_Framework_TestCase
public function testGroupContainer()
{
$node = NodeFactory::getInstance(
'PMA\libraries\navigation\nodes\Node', 'default', Node::CONTAINER, true
'Node', 'default', Node::CONTAINER, true
);
$this->assertEquals('default', $node->name);
$this->assertEquals(Node::CONTAINER, $node->type);

View File

@ -102,7 +102,7 @@ class Node_Test extends PHPUnit_Framework_TestCase
{
$parent = NodeFactory::getInstance();
$empty_container = NodeFactory::getInstance(
'PMA\libraries\navigation\nodes\Node', 'empty', Node::CONTAINER
'Node', 'empty', Node::CONTAINER
);
$child = NodeFactory::getInstance();
// test with no children
@ -156,7 +156,7 @@ class Node_Test extends PHPUnit_Framework_TestCase
$this->assertEquals($parent->numChildren(), 1);
// add a container, this one doesn't count wither
$container = NodeFactory::getInstance(
'PMA\libraries\navigation\nodes\Node', 'default', Node::CONTAINER
'Node', 'default', Node::CONTAINER
);
$parent->addChild($container);
$this->assertEquals($parent->numChildren(), 1);
@ -240,7 +240,7 @@ class Node_Test extends PHPUnit_Framework_TestCase
$firstChild = NodeFactory::getInstance();
$parent->addChild($firstChild);
$secondChild = NodeFactory::getInstance(
'PMA\libraries\navigation\nodes\Node', 'default', Node::CONTAINER
'Node', 'default', Node::CONTAINER
);
$parent->addChild($secondChild);
// Empty Node::CONTAINER type node should not be considered in hasSiblings()
@ -284,7 +284,7 @@ class Node_Test extends PHPUnit_Framework_TestCase
public function testGetWhereClause()
{
$method = new ReflectionMethod(
'PMA\libraries\navigation\nodes\Node', '_getWhereClause'
'Node', '_getWhereClause'
);
$method->setAccessible(true);