endtoend-test-psl/tests/Psl/Env/GetVarTest.php

26 lines
410 B
PHP
Raw Normal View History

2020-08-18 05:51:44 +02:00
<?php
declare(strict_types=1);
namespace Psl\Tests\Env;
use PHPUnit\Framework\TestCase;
use Psl\Env;
final class GetVarTest extends TestCase
2020-08-18 05:51:44 +02:00
{
/**
* @backupGlobals
*/
public function testGetVar(): void
{
static::assertNull(Env\get_var('FOO'));
2020-08-18 05:51:44 +02:00
Env\set_var('FOO', 'BAR');
static::assertSame('BAR', Env\get_var('FOO'));
2020-08-18 05:51:44 +02:00
Env\remove_var('FOO');
}
}