/** * @covers OpCacheGUI\Presentation\Url::__construct * @covers OpCacheGUI\Presentation\Url::get * @covers OpCacheGUI\Presentation\Url::getQueryStringUrl */ public function testGetQueryStringUrlOther() { $url = new Url(Router::QUERY_STRING); $this->assertSame('?other', $url->get('other')); }
*/ $sessionStorage = new Session(); $csrfToken = new CsrfToken($sessionStorage, new Factory()); /** * Setup the IP whitelist */ $whitelist = new Ip([new \OpCacheGUI\Network\Ip\Any(), new \OpCacheGUI\Network\Ip\Localhost(), new \OpCacheGUI\Network\Ip\Single(), new \OpCacheGUI\Network\Ip\Wildcard(), new \OpCacheGUI\Network\Ip\Range(), new \OpCacheGUI\Network\Ip\Cidr()]); $whitelist->buildWhitelist($login['whitelist']); /** * Setup the authentication object */ $user = new User($sessionStorage, $login['username'], $login['password'], $whitelist); /** * Setup URL renderer */ $urlRenderer = new Url($uriScheme); /** * Setup the HTML template renderer */ $htmlTemplate = new Html(__DIR__ . '/template', 'page.phtml', $translator, $urlRenderer); /** * Setup the JSON template renderer */ $jsonTemplate = new Json(__DIR__ . '/template', $translator); /** * Setup the request object */ $request = new Request($_GET, $_POST, $_SERVER); /** * Setup the router */