Files
Phraseanet/tests/Alchemy/Phrasea/Security/FirewallTest.php
2012-10-04 15:43:34 +02:00

22 lines
750 B
PHP

<?php
use Alchemy\Phrasea\Core\Configuration;
require_once __DIR__ . '/../../../PhraseanetWebTestCaseAuthenticatedAbstract.class.inc';
class FirewallTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;
public function testRequiredAuth()
{
$this->markTestSkipped('Introduce seg fault, to investigate');
$response = self::$DI['app']['firewall']->requireAuthentication(self::$DI['app']);
$this->assertNull($response);
self::$DI['app']->closeAccount();
$response = self::$DI['app']['firewall']->requireAuthentication(self::$DI['app']);
$this->assertTrue($response->isRedirect());
$this->assertEquals('/login/', $response->headers->get('location'));
}
}