phpmyadmin/tests/unit/Providers/ServerVariables/ServerVariablesProviderTest.php
Maurício Meneghini Fauth 2a9507b426
Add some unit tests for Providers\ServerVariables classes
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2026-02-05 15:49:47 -03:00

23 lines
712 B
PHP

<?php
declare(strict_types=1);
namespace PhpMyAdmin\Tests\Providers\ServerVariables;
use PhpMyAdmin\Providers\ServerVariables\ServerVariablesProvider;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;
use ReflectionProperty;
#[CoversClass(ServerVariablesProvider::class)]
final class ServerVariablesProviderTest extends TestCase
{
public function testUniqueness(): void
{
(new ReflectionProperty(ServerVariablesProvider::class, 'instance'))->setValue(null, null);
$instanceOne = ServerVariablesProvider::getImplementation();
$instanceTwo = ServerVariablesProvider::getImplementation();
self::assertSame($instanceOne, $instanceTwo);
}
}