lithium\tests\cases\core\EnvironmentTest::testReadWriteWithDefaultEnvironment PHP Метод

testReadWriteWithDefaultEnvironment() публичный Метод

Tests calling get() and set() with true as the envrionment name, to automatically select the current environment.
    public function testReadWriteWithDefaultEnvironment()
    {
        Environment::set('development');
        Environment::set(true, array('foo' => 'bar'));
        $this->assertEqual(array('foo' => 'bar'), Environment::get('development'));
        $this->assertEqual(Environment::get(true), Environment::get('development'));
        Environment::set('production');
        $this->assertEmpty(Environment::get(true));
    }