Replace `global` keyword with `$GLOBALS`
[phpmyadmin.git] / test / classes / ProfilingTest.php
blob752491e6b14d5a45da7bdede95e1c58a16aa77f2
1 <?php
3 declare(strict_types=1);
5 namespace PhpMyAdmin\Tests;
7 use PhpMyAdmin\Profiling;
8 use PhpMyAdmin\Utils\SessionCache;
10 /**
11 * @covers \PhpMyAdmin\Profiling
13 class ProfilingTest extends AbstractTestCase
15 public function testIsSupported(): void
17 $GLOBALS['server'] = 1;
19 SessionCache::set('profiling_supported', true);
20 $condition = Profiling::isSupported($GLOBALS['dbi']);
21 $this->assertTrue($condition);
23 SessionCache::set('profiling_supported', false);
24 $condition = Profiling::isSupported($GLOBALS['dbi']);
25 $this->assertFalse($condition);