-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Expand file tree
/
Copy pathProfilingTest.php
More file actions
28 lines (22 loc) · 735 Bytes
/
ProfilingTest.php
File metadata and controls
28 lines (22 loc) · 735 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
<?php
declare(strict_types=1);
namespace PhpMyAdmin\Tests;
use PhpMyAdmin\Dbal\DatabaseInterface;
use PhpMyAdmin\Profiling;
use PhpMyAdmin\Utils\SessionCache;
use PHPUnit\Framework\Attributes\CoversClass;
#[CoversClass(Profiling::class)]
class ProfilingTest extends AbstractTestCase
{
public function testIsSupported(): void
{
$dbi = $this->createDatabaseInterface();
DatabaseInterface::$instance = $dbi;
SessionCache::set('profiling_supported', true);
$condition = Profiling::isSupported($dbi);
self::assertTrue($condition);
SessionCache::set('profiling_supported', false);
$condition = Profiling::isSupported($dbi);
self::assertFalse($condition);
}
}