Merge pull request #19552 from kamil-tekiela/Fix-default-values
[phpmyadmin.git] / tests / unit / ProfilingTest.php
blob2ba3eb522adb05f9ef9cb6afb62cf999286b0ab7
1 <?php
3 declare(strict_types=1);
5 namespace PhpMyAdmin\Tests;
7 use PhpMyAdmin\Dbal\DatabaseInterface;
8 use PhpMyAdmin\Profiling;
9 use PhpMyAdmin\Utils\SessionCache;
10 use PHPUnit\Framework\Attributes\CoversClass;
12 #[CoversClass(Profiling::class)]
13 class ProfilingTest extends AbstractTestCase
15 public function testIsSupported(): void
17 $dbi = $this->createDatabaseInterface();
18 DatabaseInterface::$instance = $dbi;
20 SessionCache::set('profiling_supported', true);
21 $condition = Profiling::isSupported($dbi);
22 self::assertTrue($condition);
24 SessionCache::set('profiling_supported', false);
25 $condition = Profiling::isSupported($dbi);
26 self::assertFalse($condition);