aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/App/AppStore/Fetcher/AppFetcherTest.php')
-rw-r--r--tests/lib/App/AppStore/Fetcher/AppFetcherTest.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
index 6c0d079a204..f3769fc09c3 100644
--- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
+++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
@@ -22,6 +22,7 @@
namespace Test\App\AppStore\Fetcher;
use OC\App\AppStore\Fetcher\AppFetcher;
+use OC\Files\AppData\Factory;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Files\IAppData;
use OCP\Files\NotFoundException;
@@ -53,7 +54,13 @@ EOD;
public function setUp() {
parent::setUp();
+ /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */
+ $factory = $this->createMock(Factory::class);
$this->appData = $this->createMock(IAppData::class);
+ $factory->expects($this->once())
+ ->method('get')
+ ->with('appstore')
+ ->willReturn($this->appData);
$this->clientService = $this->createMock(IClientService::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
$this->config = $this->createMock(IConfig::class);
@@ -64,7 +71,7 @@ EOD;
->with('version')
->willReturn('11.0.0.2');
$this->fetcher = new AppFetcher(
- $this->appData,
+ $factory,
$this->clientService,
$this->timeFactory,
$this->config