mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 04:23:19 +00:00
36 lines
894 B
PHP
36 lines
894 B
PHP
<?php
|
|
|
|
require_once __DIR__ . '/../../../PhraseanetWebTestCaseAuthenticatedAbstract.class.inc';
|
|
|
|
require_once __DIR__ . '/../../../../Alchemy/Phrasea/Application/Setup.php';
|
|
|
|
use Silex\WebTestCase;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
class ApplicationSetupTest extends PhraseanetWebTestCaseAuthenticatedAbstract
|
|
{
|
|
|
|
protected $client;
|
|
protected static $need_records = false;
|
|
|
|
public function createApplication()
|
|
{
|
|
return require __DIR__ . '/../../../../Alchemy/Phrasea/Application/Setup.php';
|
|
}
|
|
|
|
public function setUp()
|
|
{
|
|
parent::setUp();
|
|
$this->client = $this->createClient();
|
|
}
|
|
|
|
public function testRouteSlash()
|
|
{
|
|
$crawler = $this->client->request('GET', '/');
|
|
$response = $this->client->getResponse();
|
|
$this->assertEquals(302, $response->getStatusCode());
|
|
$this->assertEquals('/login/', $response->headers->get('location'));
|
|
}
|
|
|
|
}
|