Add AuthenticationServiceProvider

This commit is contained in:
Romain Neutron
2013-02-15 11:08:05 +01:00
parent f5c5aebe22
commit d2bc4f4a23
117 changed files with 610 additions and 535 deletions

View File

@@ -60,12 +60,12 @@ class NotificationsTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
*/
public function testRequireAuthentication()
{
self::$DI['app']['phraseanet.user'] = $this->getMockBuilder('\User_Adapter')
self::$DI['app']['authentication']->setUser($this->getMockBuilder('\User_Adapter')
->setMethods(array('is_guest'))
->disableOriginalConstructor()
->getMock();
->getMock());
self::$DI['app']['phraseanet.user']->expects($this->once())
self::$DI['app']['authentication']->getUser()->expects($this->once())
->method('is_guest')
->will($this->returnValue(true));