Fix tests

This commit is contained in:
Nicolas Le Goff
2013-12-05 14:21:50 +01:00
parent 49744c5e2f
commit b341495c88
122 changed files with 963 additions and 3454 deletions

View File

@@ -20,7 +20,7 @@ abstract class PhraseanetAuthenticatedWebTestCase extends \PhraseanetAuthenticat
public function setAdmin($bool)
{
$stubAuthenticatedUser = $this->getMockBuilder('Alchemy\Phrasea\Model\Entities\User')//, array('is_admin', 'ACL'), array(self::$DI['app']['authentication']->getUser()->getId(), self::$DI['app']))
$stubAuthenticatedUser = $this->getMockBuilder('Alchemy\Phrasea\Model\Entities\User')
->setMethods(['getId'])
->disableOriginalConstructor()
->getMock();
@@ -82,16 +82,6 @@ abstract class PhraseanetAuthenticatedWebTestCase extends \PhraseanetAuthenticat
->will($this->returnValue($this->StubbedACL));
self::$DI['app']['acl'] = $aclProvider;
$stubAuthenticatedUser->expects($this->any())
->method('getId')
->will($this->returnValue(self::$DI['user']->getId()));
self::$DI['app']['authentication']->setUser($stubAuthenticatedUser);
self::$DI['client'] = self::$DI->share(function ($DI) {
return new Client($DI['app'], []);
});
}
public function createDatabox()