-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Expand file tree
/
Copy pathConsoleTest.php
More file actions
30 lines (26 loc) · 972 Bytes
/
ConsoleTest.php
File metadata and controls
30 lines (26 loc) · 972 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
declare(strict_types=1);
namespace PhpMyAdmin\Tests;
use PhpMyAdmin\Bookmarks\BookmarkRepository;
use PhpMyAdmin\Config;
use PhpMyAdmin\ConfigStorage\Relation;
use PhpMyAdmin\Console\Console;
use PhpMyAdmin\Console\History;
use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\Template;
use PHPUnit\Framework\Attributes\CoversClass;
#[CoversClass(Console::class)]
class ConsoleTest extends AbstractTestCase
{
public function testGetScripts(): void
{
DatabaseInterface::$instance = $this->createDatabaseInterface();
$dbi = DatabaseInterface::getInstance();
$config = Config::getInstance();
$relation = new Relation($dbi);
$bookmarkRepository = new BookmarkRepository($dbi, $relation);
$history = new History($dbi, $relation, $config);
$console = new Console($relation, new Template($config), $bookmarkRepository, $history);
self::assertSame(['console.js'], $console->getScripts());
}
}