mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
26 lines
709 B
PHP
26 lines
709 B
PHP
<?php
|
|
|
|
namespace Alchemy\Tests\Phrasea\Security;
|
|
|
|
use Alchemy\Phrasea\Security\Firewall;
|
|
|
|
class FirewallTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
|
{
|
|
protected $client;
|
|
|
|
public function testRequiredAuth()
|
|
{
|
|
$res = self::$DI['app']['firewall']->requireAuthentication(self::$DI['app']);
|
|
$this->assertInstanceOf('\\Alchemy\\Phrasea\\Security\\Firewall', $res);
|
|
}
|
|
|
|
/**
|
|
* @expectedException Symfony\Component\HttpKernel\Exception\HttpException
|
|
*/
|
|
public function testRequiredAuthNotAuthenticated()
|
|
{
|
|
self::$DI['app']['authentication']->closeAccount();
|
|
self::$DI['app']['firewall']->requireAuthentication(self::$DI['app']);
|
|
}
|
|
}
|