mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Merge pull request #957 from romainneutron/doctrine-namespace
[3.9] Add a namespace to Phraseanet doctrine entities
This commit is contained in:
@@ -155,7 +155,7 @@ class AuthenticatorTest extends \PhraseanetTestCase
|
||||
|
||||
$em->expects($this->once())
|
||||
->method('getRepository')
|
||||
->with($this->equalTo('Alchemy\Phrasea\Model\Entities\Session'))
|
||||
->with($this->equalTo('Phraseanet:Session'))
|
||||
->will($this->returnValue($repo));
|
||||
|
||||
$authenticator = new Authenticator($app, $browser, $SFsession, $em);
|
||||
@@ -197,7 +197,7 @@ class AuthenticatorTest extends \PhraseanetTestCase
|
||||
|
||||
$em->expects($this->once())
|
||||
->method('getRepository')
|
||||
->with($this->equalTo('Alchemy\Phrasea\Model\Entities\Session'))
|
||||
->with($this->equalTo('Phraseanet:Session'))
|
||||
->will($this->returnValue($repo));
|
||||
|
||||
$authenticator = new Authenticator($app, $browser, $SFsession, $em);
|
||||
|
@@ -41,7 +41,7 @@ class ManagerTest extends \PhraseanetTestCase
|
||||
|
||||
$em->expects($this->once())
|
||||
->method('getRepository')
|
||||
->with($this->equalTo('Alchemy\Phrasea\Model\Entities\Session'))
|
||||
->with($this->equalTo('Phraseanet:Session'))
|
||||
->will($this->returnValue($repo));
|
||||
|
||||
$encoder->expects($this->once())
|
||||
@@ -86,7 +86,7 @@ class ManagerTest extends \PhraseanetTestCase
|
||||
|
||||
$em->expects($this->once())
|
||||
->method('getRepository')
|
||||
->with($this->equalTo('Alchemy\Phrasea\Model\Entities\Session'))
|
||||
->with($this->equalTo('Phraseanet:Session'))
|
||||
->will($this->returnValue($repo));
|
||||
|
||||
$encoder->expects($this->once())
|
||||
@@ -119,7 +119,7 @@ class ManagerTest extends \PhraseanetTestCase
|
||||
|
||||
$em->expects($this->once())
|
||||
->method('getRepository')
|
||||
->with($this->equalTo('Alchemy\Phrasea\Model\Entities\Session'))
|
||||
->with($this->equalTo('Phraseanet:Session'))
|
||||
->will($this->returnValue($repo));
|
||||
|
||||
$this->assertFalse($manager->getSession($tokenValue));
|
||||
|
@@ -250,17 +250,17 @@ class FailureManagerTest extends \PhraseanetTestCase
|
||||
->method('getClientIp')
|
||||
->will($this->returnValue($ip));
|
||||
|
||||
$this->assertCount(10, self::$DI['app']['EM']->getRepository('Alchemy\Phrasea\Model\Entities\AuthFailure')
|
||||
$this->assertCount(10, self::$DI['app']['EM']->getRepository('Phraseanet:AuthFailure')
|
||||
->findOldFailures());
|
||||
$this->assertCount(12, self::$DI['app']['EM']->getRepository('Alchemy\Phrasea\Model\Entities\AuthFailure')
|
||||
$this->assertCount(12, self::$DI['app']['EM']->getRepository('Phraseanet:AuthFailure')
|
||||
->findAll());
|
||||
|
||||
$manager = new FailureManager(self::$DI['app']['EM'], $recaptcha, 9);
|
||||
$manager->saveFailure($username, $request);
|
||||
|
||||
$this->assertCount(0, self::$DI['app']['EM']->getRepository('Alchemy\Phrasea\Model\Entities\AuthFailure')
|
||||
$this->assertCount(0, self::$DI['app']['EM']->getRepository('Phraseanet:AuthFailure')
|
||||
->findOldFailures());
|
||||
$this->assertCount(3, self::$DI['app']['EM']->getRepository('Alchemy\Phrasea\Model\Entities\AuthFailure')
|
||||
$this->assertCount(3, self::$DI['app']['EM']->getRepository('Phraseanet:AuthFailure')
|
||||
->findAll());
|
||||
|
||||
self::$DI['app']['EM']->getEventManager()->addEventSubscriber(new TimestampableListener());
|
||||
@@ -285,7 +285,7 @@ class FailureManagerTest extends \PhraseanetTestCase
|
||||
|
||||
$em->expects($this->once())
|
||||
->method('getRepository')
|
||||
->with($this->equalTo('Alchemy\Phrasea\Model\Entities\AuthFailure'))
|
||||
->with($this->equalTo('Phraseanet:AuthFailure'))
|
||||
->will($this->returnValue($repo));
|
||||
|
||||
return $em;
|
||||
|
Reference in New Issue
Block a user