fix constructor params in failing test

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2017-01-02 13:13:20 +01:00 committed by Roeland Jago Douma
parent 21d3fe5883
commit 6f84eb89fc
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 9 additions and 6 deletions

View File

@ -31,25 +31,27 @@ use OCA\Files_External\Lib\Backend\Local;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\Service\GlobalStoragesService;
use OCA\Files_External\Service\UserStoragesService;
use OCP\Authentication\LoginCredentials\IStore;
use OCP\IL10N;
use OCP\ISession;
use OCP\IUserManager;
use OCP\IUserSession;
use OCP\Security\ICrypto;
use PHPUnit_Framework_MockObject_MockObject;
use Symfony\Component\Console\Output\BufferedOutput;
class ListCommandTest extends CommandTest {
/**
* @return \OCA\Files_External\Command\ListCommand|\PHPUnit_Framework_MockObject_MockObject
* @return ListCommand|PHPUnit_Framework_MockObject_MockObject
*/
private function getInstance() {
/** @var \OCA\Files_External\Service\GlobalStoragesService|\PHPUnit_Framework_MockObject_MockObject $globalService */
/** @var GlobalStoragesService|PHPUnit_Framework_MockObject_MockObject $globalService */
$globalService = $this->createMock(GlobalStoragesService::class);
/** @var \OCA\Files_External\Service\UserStoragesService|\PHPUnit_Framework_MockObject_MockObject $userService */
/** @var UserStoragesService|PHPUnit_Framework_MockObject_MockObject $userService */
$userService = $this->createMock(UserStoragesService::class);
/** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject $userManager */
/** @var IUserManager|PHPUnit_Framework_MockObject_MockObject $userManager */
$userManager = $this->createMock(IUserManager::class);
/** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject $userSession */
/** @var IUserSession|PHPUnit_Framework_MockObject_MockObject $userSession */
$userSession = $this->createMock(IUserSession::class);
return new ListCommand($globalService, $userService, $userSession, $userManager);
@ -64,7 +66,8 @@ class ListCommandTest extends CommandTest {
$mount1->setAuthMechanism(new Password($l10n));
$mount1->setBackend(new Local($l10n, new NullMechanism($l10n)));
$mount2 = new StorageConfig();
$mount2->setAuthMechanism(new SessionCredentials($l10n, $session, $crypto));
$credentialStore = $this->createMock(IStore::class);
$mount2->setAuthMechanism(new SessionCredentials($l10n, $credentialStore));
$mount2->setBackend(new Local($l10n, new NullMechanism($l10n)));
$input = $this->getInput($instance, [], [
'output' => 'json'