1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-31 10:54:46 +03:00
Files
phpmyadmin/tests/classes/ProfilingTest.php
Maurício Meneghini Fauth ba72f543fd Call PHPUnit static methods using static calls
Replaces $this->method() with self::method().

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-01-31 17:17:38 -03:00

29 lines
730 B
PHP

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