Merge branch '3.8'

Conflicts:
	lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php
	lib/Alchemy/Phrasea/Controller/Admin/Users.php
	lib/Alchemy/Phrasea/Controller/Lightbox.php
	lib/Alchemy/Phrasea/Controller/Prod/Basket.php
	lib/Alchemy/Phrasea/Controller/Prod/TOU.php
	lib/Alchemy/Phrasea/Controller/Prod/WorkZone.php
	lib/Alchemy/Phrasea/Controller/Root/Session.php
	lib/Alchemy/Phrasea/Security/Firewall.php
	lib/classes/task/abstract.php
	tests/Alchemy/Tests/Phrasea/Security/FirewallTest.php
This commit is contained in:
Nicolas Le Goff
2014-02-05 19:42:22 +01:00
52 changed files with 133 additions and 120 deletions

View File

@@ -2,24 +2,18 @@
namespace Alchemy\Tests\Phrasea\Security;
use Alchemy\Phrasea\Security\Firewall;
class FirewallTest extends \PhraseanetAuthenticatedWebTestCase
{
protected $client;
public function testRequiredAuth()
{
$res = self::$DI['app']['firewall']->requireAuthentication(self::$DI['app']);
$this->assertInstanceOf('\\Alchemy\\Phrasea\\Security\\Firewall', $res);
$this->assertNull(self::$DI['app']['firewall']->requireAuthentication(self::$DI['app']));
}
/**
* @expectedException \Symfony\Component\HttpKernel\Exception\HttpException
*/
public function testRequiredAuthNotAuthenticated()
{
$this->logout(self::$DI['app']);
self::$DI['app']['firewall']->requireAuthentication(self::$DI['app']);
$this->assertInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse', self::$DI['app']['firewall']->requireAuthentication(self::$DI['app']));
}
}