phpmyadmin/test/classes/ProfilingTest.php
Maurício Meneghini Fauth 3f2c53ef1d
Replace PHPUnit annotations with attributes
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-06-07 11:44:01 -03:00

28 lines
718 B
PHP

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