public function testRefererLocalFromNotLocal() { $_SERVER['HTTP_REFERER'] = 'http://lithium.com/posts/index'; $request = new Request(); $expected = '/'; $result = $request->referer('/', true); $this->assertEqual($expected, $result); }
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); }