3 declare(strict_types
=1);
5 namespace PhpMyAdmin\Tests\Navigation\Nodes
;
7 use PhpMyAdmin\Navigation\NodeFactory
;
8 use PhpMyAdmin\Tests\AbstractTestCase
;
10 class NodeViewContainerTest
extends AbstractTestCase
13 * SetUp for test cases
15 protected function setUp(): void
18 parent
::loadDefaultConfig();
19 $GLOBALS['server'] = 0;
20 $GLOBALS['cfg']['NavigationTreeEnableGrouping'] = true;
21 $GLOBALS['cfg']['NavigationTreeDbSeparator'] = '_';
22 $GLOBALS['cfg']['NavigationTreeTableSeparator'] = '__';
23 $GLOBALS['cfg']['NavigationTreeTableLevel'] = 1;
27 * Test for __construct
29 public function testConstructor(): void
31 $parent = NodeFactory
::getInstance('NodeViewContainer');
32 $this->assertArrayHasKey(
36 $this->assertStringContainsString(
37 'index.php?route=/database/structure',
38 $parent->links
['text']
40 $this->assertEquals('views', $parent->realName
);
41 $this->assertStringContainsString('viewContainer', $parent->classes
);