/** * SetupTest::testCleanedUrl() * * @return void */ public function testCleanedUrl() { $url = ['controller' => 'ControllerName', 'action' => 'action_name', '?' => ['clearcache' => 1, 'foo' => 'bar']]; $result = Setup::cleanedUrl('clearcache', $url); $expected = ['controller' => 'ControllerName', 'action' => 'action_name', '?' => ['foo' => 'bar']]; $this->assertSame($expected, $result); }
/** * Remove specific named param from parsed url array * * @param string|array $type * @return array URL */ protected function _cleanedUrl($type) { $type = (array) $type; if (Configure::read('Config.productive')) { $type[] = 'pwd'; } return Setup::cleanedUrl($type, $this->Controller->request->params + ['?' => $this->Controller->request->query]); }