Fixup some tests using UserManipulator

This commit is contained in:
Benoît Burnichon
2015-11-03 17:41:48 +01:00
parent 67a9f9e106
commit 8ad5d05e43
3 changed files with 28 additions and 10 deletions

View File

@@ -84,7 +84,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'], self::$DI['app']['random.low']);
$manipulator = new UserManipulator($manager, $passwordInterface, $geonamesConnector, self::$DI['app']['repo.tasks'], self::$DI['app']['random.low'], self::$DI['app']['dispatcher']);
$manipulator->setGeonameId($user, 4);
$this->assertEquals(4, $user->getGeonameId());
@@ -150,7 +150,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'], self::$DI['app']['random.low']);
$manipulator = new UserManipulator($manager, $passwordInterface, $geonamesConnector, self::$DI['app']['repo.tasks'], self::$DI['app']['random.low'], self::$DI['app']['dispatcher']);
$this->setExpectedException(
'Alchemy\Phrasea\Exception\InvalidArgumentException',
'Invalid geonameid -1.'