mirror of
https://github.com/danog/endtoend-test-psl.git
synced 2024-11-30 04:39:48 +01:00
29 lines
507 B
PHP
29 lines
507 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Psl\Tests\Env;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Psl\Env;
|
|
|
|
final class GetVarsTest extends TestCase
|
|
{
|
|
/**
|
|
* @backupGlobals
|
|
*/
|
|
public function testGetVars(): void
|
|
{
|
|
$expected = getenv();
|
|
|
|
static::assertSame($expected, Env\get_vars());
|
|
|
|
Env\set_var('FOO', 'BAR');
|
|
|
|
static::assertNotSame($expected, Env\get_vars());
|
|
static::assertSame(getenv(), Env\get_vars());
|
|
|
|
Env\remove_var('FOO');
|
|
}
|
|
}
|