phpmyadmin/tests/classes/Navigation/Nodes/NodeViewTest.php
Maurício Meneghini Fauth 1d1c55e250
Move test directory to tests
- Related to #18512

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-11-30 10:47:42 -03:00

32 lines
929 B
PHP

<?php
declare(strict_types=1);
namespace PhpMyAdmin\Tests\Navigation\Nodes;
use PhpMyAdmin\Navigation\Nodes\NodeView;
use PhpMyAdmin\Tests\AbstractTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
#[CoversClass(NodeView::class)]
class NodeViewTest extends AbstractTestCase
{
/**
* Test for __construct
*/
public function testConstructor(): void
{
$parent = new NodeView('default');
$this->assertEquals(
[
'text' => ['route' => '/sql', 'params' => ['pos' => 0, 'db' => null, 'table' => null]],
'icon' => ['route' => '/table/structure', 'params' => ['db' => null, 'table' => null]],
],
$parent->links,
);
$this->assertEquals('b_props', $parent->icon['image']);
$this->assertEquals('View', $parent->icon['title']);
$this->assertStringContainsString('view', $parent->classes);
}
}