phpmyadmin/test/classes/ProfilingTest.php
Maurício Meneghini Fauth e4e274976e Extract cache methods from Util to SessionCache class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-25 22:45:56 -03:00

27 lines
577 B
PHP

<?php
declare(strict_types=1);
namespace PhpMyAdmin\Tests;
use PhpMyAdmin\Profiling;
use PhpMyAdmin\Utils\SessionCache;
class ProfilingTest extends AbstractTestCase
{
public function testIsSupported(): void
{
global $dbi, $server;
$server = 1;
SessionCache::set('profiling_supported', true);
$condition = Profiling::isSupported($dbi);
$this->assertTrue($condition);
SessionCache::set('profiling_supported', false);
$condition = Profiling::isSupported($dbi);
$this->assertFalse($condition);
}
}