/** * @tags installation http */ function case_redirect_to_index() { $this->given($configuration = new Configuration($this->helper->configuration('server.json', ['base_url' => '/mybase/'])), $response = new HTTP\Response())->when($result = CUT::redirectToIndex($response, $configuration))->then->variable($result)->isNull()->object($response)->integer($response->getStatus())->isEqualTo(308)->string($response->getHeader('Location'))->isEqualTo('/mybase/')->string($response->getBody())->isNotEmpty(); }