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

29 lines
495 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;
class GetVarsTest extends TestCase
{
/**
* @backupGlobals
*/
public function testGetVars(): void
{
$expected = getenv();
self::assertSame($expected, Env\get_vars());
Env\set_var('FOO', 'BAR');
self::assertNotSame($expected, Env\get_vars());
self::assertSame(getenv(), Env\get_vars());
Env\remove_var('FOO');
}
}