Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Gets the value of an environment variable
getenv(string $varnamebool $local_only false): string|false
        (new LoadEnvironmentVariables)->bootstrap($this->getAppMock('.env'));



        
$this->assertSame('BAR'env('FOO'));

        
$this->assertSame('BAR'getenv('FOO'));

        
$this->assertSame('BAR'$_ENV['FOO']);

        
$this->assertSame('BAR'$_SERVER['FOO']);

    }
{

    protected function 
getEnvironmentSetUp($app)

    {

        if (
getenv('DB_CONNECTION') !== 'testing') {

            
$this->markTestSkipped('Test requires a Sqlite connection.');

        }
{

    protected function 
getEnvironmentSetUp($app)

    {

        if (
getenv('DB_CONNECTION') !== 'testing') {

            
$this->markTestSkipped('Test requires a Sqlite connection.');

        }
{

    protected function 
getEnvironmentSetUp($app)

    {

        if (
getenv('DB_CONNECTION') !== 'testing') {

            
$this->markTestSkipped('Test requires a Sqlite connection.');

        }