lithium\tests\cases\action\RequestTest::testRefererLocalFromNotLocal PHP Method

testRefererLocalFromNotLocal() public method

    public function testRefererLocalFromNotLocal()
    {
        $request = new Request(array('env' => array('HTTP_REFERER' => 'http://lithium.com/posts/index', 'HTTP_HOST' => 'foo.com')));
        $expected = '/';
        $result = $request->referer('/', true);
        $this->assertEqual($expected, $result);
    }
RequestTest