aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2017-01-02 13:13:20 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2017-01-11 19:20:11 +0100
commit6f84eb89fc5f46dc1fd064563a06a03b2d8e9577 (patch)
tree09cce941cdbcf44cbcd62284f68889c829b714ab
parent21d3fe588396ebb3535a947ee4afd514aa24bd78 (diff)
downloadnextcloud-server-6f84eb89fc5f46dc1fd064563a06a03b2d8e9577.tar.gz
nextcloud-server-6f84eb89fc5f46dc1fd064563a06a03b2d8e9577.zip
fix constructor params in failing test
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--apps/files_external/tests/Command/ListCommandTest.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/files_external/tests/Command/ListCommandTest.php b/apps/files_external/tests/Command/ListCommandTest.php
index 5563b19c7a8..76a8f98f520 100644
--- a/apps/files_external/tests/Command/ListCommandTest.php
+++ b/apps/files_external/tests/Command/ListCommandTest.php
@@ -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'