Add a namespace to Phraseanet doctrine entities

This commit is contained in:
Romain Neutron
2014-02-18 18:53:38 +01:00
parent 094b3f5c9d
commit 2de870c3f9
120 changed files with 444 additions and 441 deletions

View File

@@ -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);

View File

@@ -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));

View File

@@ -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;