setAdmin(true); self::$DI['client']->request('GET', '/admin/sphinx/configuration/'); $this->assertTrue(self::$DI['client']->getResponse()->isOk()); } /** * @covers Alchemy\Phrasea\Controller\Admin\Sphinx::getConfiguration * @expectedException \Symfony\Component\HttpKernel\Exception\HttpException */ public function testGetConfigurationUnauthorizedException() { $this->setAdmin(false); self::$DI['client']->request('GET', '/admin/sphinx/configuration/'); $this->assertTrue(self::$DI['client']->getResponse()->isOk()); } /** * @covers Alchemy\Phrasea\Controller\Admin\Sphinx::submitConfiguration */ public function testPostConfiguration() { $this->setAdmin(true); self::$DI['client']->request('POST', '/admin/sphinx/configuration/'); $this->assertTrue(self::$DI['client']->getResponse()->isRedirect()); } }