phpmyadmin/test/classes/ProfilingTest.php
Maurício Meneghini Fauth f3b79d83c0
Add PHPUnit's Covers annotation on test classes
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-06-04 23:39:26 -03:00

30 lines
618 B
PHP

<?php
declare(strict_types=1);
namespace PhpMyAdmin\Tests;
use PhpMyAdmin\Profiling;
use PhpMyAdmin\Utils\SessionCache;
/**
* @covers \PhpMyAdmin\Profiling
*/
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);
}
}