TestEnvironment::testWhichEnvironmentDefault PHP Method

testWhichEnvironmentDefault() public method

Test in which environment the application will run.
    public function testWhichEnvironmentDefault()
    {
        $locations = ['local' => ['local-hostname', 'another-host', 'team-localhost'], 'production' => 'prod-hostname'];
        // If nothing is found - Should return empty string.
        $env = new Thms\Config\Environment($locations);
        $this->assertEquals('', $env->which());
        // Simulate local hostname.
        $this->assertEquals('local', $env->which('team-localhost'));
        $this->assertEquals('production', $env->which('prod-hostname'));
    }