lithium\tests\cases\console\RequestTest::testConstructWithEnv PHP Method

testConstructWithEnv() public method

    public function testConstructWithEnv()
    {
        $base = Libraries::get(true, 'resources') . '/tmp/tests';
        $this->skipIf(!is_readable($base), "Path `{$base}` is not readable.");
        chdir(Libraries::get(true, 'resources') . '/tmp');
        $request = new Request(array('env' => array('working' => '/some/other/path')));
        $expected = '/some/other/path';
        $result = $request->env('working');
        $this->assertEqual($expected, $result);
    }