/** * @dataProvider getServerValues */ public function testGetCurrentUrlOtherSource($data) { $source = array(); foreach (self::$serverMapping as $key => $mapping) { if ($data[$key] !== null) { $source[$mapping] = $data[$key]; } } $expected = $data[4]; $this->assertEquals($expected, ezcUrlTools::getCurrentUrl($source), "Failed building URL " . $data[4]); }
function runAddCurrentUrlFilter(ezcMvcResult $result) { $result->variables['currentUrl'] = ezcUrlTools::getCurrentUrl(); }