diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-04-25 23:16:52 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2017-04-26 20:07:51 +0200 |
commit | 3f9aaac4a25c0727ebc8974adbd65ef40612ca55 (patch) | |
tree | dd68f59bbb005c8e8c9e9b3b401be78d297f84ac /tests/lib/InstallerTest.php | |
parent | d4ba8198fe73d86d264eef4eeeba12bc560306c4 (diff) | |
download | nextcloud-server-3f9aaac4a25c0727ebc8974adbd65ef40612ca55.tar.gz nextcloud-server-3f9aaac4a25c0727ebc8974adbd65ef40612ca55.zip |
Adjust tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'tests/lib/InstallerTest.php')
-rw-r--r-- | tests/lib/InstallerTest.php | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/lib/InstallerTest.php b/tests/lib/InstallerTest.php index d1923970588..a31c8826bd9 100644 --- a/tests/lib/InstallerTest.php +++ b/tests/lib/InstallerTest.php @@ -9,11 +9,13 @@ namespace Test; +use OC\App\AppStore\Bundles\Bundle; use OC\App\AppStore\Fetcher\AppFetcher; use OC\Archive\ZIP; use OC\Installer; use OCP\Http\Client\IClient; use OCP\Http\Client\IClientService; +use OCP\IConfig; use OCP\ILogger; use OCP\ITempManager; @@ -29,6 +31,8 @@ class InstallerTest extends TestCase { private $tempManager; /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ private $logger; + /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + private $config; /** @var Installer */ private $installer; @@ -40,11 +44,13 @@ class InstallerTest extends TestCase { $this->clientService = $this->createMock(IClientService::class); $this->tempManager = $this->createMock(ITempManager::class); $this->logger = $this->createMock(ILogger::class); + $this->config = $this->createMock(IConfig::class); $this->installer = new Installer( $this->appFetcher, $this->clientService, $this->tempManager, - $this->logger + $this->logger, + $this->config ); $config = \OC::$server->getConfig(); @@ -54,7 +60,8 @@ class InstallerTest extends TestCase { \OC::$server->getAppFetcher(), \OC::$server->getHTTPClientService(), \OC::$server->getTempManager(), - \OC::$server->getLogger() + \OC::$server->getLogger(), + $config ); $installer->removeApp(self::$appid); } @@ -64,7 +71,8 @@ class InstallerTest extends TestCase { \OC::$server->getAppFetcher(), \OC::$server->getHTTPClientService(), \OC::$server->getTempManager(), - \OC::$server->getLogger() + \OC::$server->getLogger(), + \OC::$server->getConfig() ); $installer->removeApp(self::$appid); \OC::$server->getConfig()->setSystemValue('appstoreenabled', $this->appstore); @@ -86,7 +94,8 @@ class InstallerTest extends TestCase { \OC::$server->getAppFetcher(), \OC::$server->getHTTPClientService(), \OC::$server->getTempManager(), - \OC::$server->getLogger() + \OC::$server->getLogger(), + \OC::$server->getConfig() ); $installer->installApp(self::$appid); $isInstalled = Installer::isInstalled(self::$appid); |