40 lines
905 B
PHP
40 lines
905 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace PhpMyAdmin\Tests\Navigation\Nodes;
|
|
|
|
use PhpMyAdmin\Navigation\NodeFactory;
|
|
use PhpMyAdmin\Tests\AbstractTestCase;
|
|
|
|
class NodeViewTest extends AbstractTestCase
|
|
{
|
|
/**
|
|
* SetUp for test cases
|
|
*/
|
|
protected function setUp(): void
|
|
{
|
|
parent::setUp();
|
|
parent::loadDefaultConfig();
|
|
$GLOBALS['server'] = 0;
|
|
}
|
|
|
|
/**
|
|
* Test for __construct
|
|
*/
|
|
public function testConstructor(): void
|
|
{
|
|
$parent = NodeFactory::getInstance('NodeView');
|
|
$this->assertArrayHasKey(
|
|
'text',
|
|
$parent->links
|
|
);
|
|
$this->assertStringContainsString(
|
|
'index.php?route=/sql',
|
|
$parent->links['text']
|
|
);
|
|
$this->assertStringContainsString('b_props', $parent->icon);
|
|
$this->assertStringContainsString('view', $parent->classes);
|
|
}
|
|
}
|