phpmyadmin/test/classes/ProfilingTest.php
Maurício Meneghini Fauth 7fc96d6621
Call PHPUnit static methods using static calls
Backports #18907 to QA_5_2.

This makes merging QA_5_2 into master easier.
Changes done using Rector.

- #18907

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2024-10-12 14:28:22 -03:00

30 lines
616 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);
self::assertTrue($condition);
SessionCache::set('profiling_supported', false);
$condition = Profiling::isSupported($dbi);
self::assertFalse($condition);
}
}