Files
Phraseanet/tests/Alchemy/Tests/Phrasea/Security/FirewallTest.php
2014-05-06 15:20:05 +02:00

20 lines
532 B
PHP

<?php
namespace Alchemy\Tests\Phrasea\Security;
class FirewallTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;
public function testRequiredAuth()
{
$this->assertNull(self::$DI['app']['firewall']->requireAuthentication());
}
public function testRequiredAuthNotAuthenticated()
{
$this->logout(self::$DI['app']);
$this->assertInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse', self::$DI['app']['firewall']->requireAuthentication());
}
}