Substitute random string generator by Randomlib

This commit is contained in:
Romain Neutron
2014-02-28 02:41:14 +01:00
parent 85ddffd3b6
commit 92a4c35340
59 changed files with 308 additions and 222 deletions

View File

@@ -74,7 +74,7 @@ class UserManipulatorTest extends \PhraseanetTestCase
->getMock();
$user = self::$DI['app']['manipulator.user']->createUser('login', 'password');
$manipulator = new UserManipulator($manager, $passwordInterface, $geonamesConnector, self::$DI['app']['repo.tasks']);
$manipulator = new UserManipulator($manager, $passwordInterface, $geonamesConnector, self::$DI['app']['repo.tasks'], self::$DI['app']['random.low']);
$manipulator->setGeonameId($user, 4);
$this->assertEquals(4, $user->getGeonameId());
@@ -140,7 +140,7 @@ class UserManipulatorTest extends \PhraseanetTestCase
$passwordInterface = $this->getMockBuilder('Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface')
->getMock();
$user = self::$DI['app']['manipulator.user']->createUser('login', 'password');
$manipulator = new UserManipulator($manager, $passwordInterface, $geonamesConnector, self::$DI['app']['repo.tasks']);
$manipulator = new UserManipulator($manager, $passwordInterface, $geonamesConnector, self::$DI['app']['repo.tasks'], self::$DI['app']['random.low']);
$this->setExpectedException(
'Alchemy\Phrasea\Exception\InvalidArgumentException',
'Invalid geonameid -1.'