Files
Phraseanet/lib/unitTest/Alchemy/Phrasea/Controller/Prod/RootTest.php
2012-01-26 12:32:37 +01:00

57 lines
1.2 KiB
PHP

<?php
require_once __DIR__ . '/../../../../PhraseanetWebTestCaseAuthenticatedAbstract.class.inc';
/**
* Test class for Root.
* Generated by PHPUnit on 2012-01-11 at 18:24:30.
*/
class ControllerRootTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
/**
* As controllers use WebTestCase, it requires a client
*/
protected $client;
/**
* If the controller tests require some records, specify it her
*
* For example, this will loacd 2 records
* (self::$record_1 and self::$record_2) :
*
* $need_records = 2;
*
*/
protected static $need_records = false;
/**
* The application loader
*/
public function createApplication()
{
return require __DIR__ . '/../../../../../Alchemy/Phrasea/Application/Prod.php';
}
public function setUp()
{
parent::setUp();
$this->client = $this->createClient();
}
/**
* Default route test
*/
public function testRouteSlash()
{
$crawler = $this->client->request('GET', '/');
$response = $this->client->getResponse();
/* @var $response \Symfony\Component\HttpFoundation\Response */
$this->assertEquals(200, $response->getStatusCode());
$this->assertEquals('UTF-8', $response->getCharset());
}
}