Merge pull request #19552 from kamil-tekiela/Fix-default-values
[phpmyadmin.git] / tests / unit / Engines / MemoryTest.php
blobad7e37c17aabb758896015ca3349ae0c5916383d
1 <?php
3 declare(strict_types=1);
5 namespace PhpMyAdmin\Tests\Engines;
7 use PhpMyAdmin\Dbal\DatabaseInterface;
8 use PhpMyAdmin\Engines\Memory;
9 use PhpMyAdmin\Tests\AbstractTestCase;
10 use PHPUnit\Framework\Attributes\CoversClass;
12 #[CoversClass(Memory::class)]
13 class MemoryTest extends AbstractTestCase
15 protected Memory $object;
17 /**
18 * Sets up the fixture, for example, opens a network connection.
19 * This method is called before a test is executed.
21 protected function setUp(): void
23 parent::setUp();
25 DatabaseInterface::$instance = $this->createDatabaseInterface();
26 $this->object = new Memory('memory');
29 /**
30 * Tears down the fixture, for example, closes a network connection.
31 * This method is called after a test is executed.
33 protected function tearDown(): void
35 parent::tearDown();
37 unset($this->object);
40 /**
41 * Test for getVariables
43 public function testGetVariables(): void
45 self::assertSame(
46 $this->object->getVariables(),
47 ['max_heap_table_size' => ['type' => 1]],