diff options
Diffstat (limited to 'tests/lib/App/AppStore/Fetcher/FetcherBase.php')
-rw-r--r-- | tests/lib/App/AppStore/Fetcher/FetcherBase.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/lib/App/AppStore/Fetcher/FetcherBase.php b/tests/lib/App/AppStore/Fetcher/FetcherBase.php index 96e4f3ae81a..3d89ae942ab 100644 --- a/tests/lib/App/AppStore/Fetcher/FetcherBase.php +++ b/tests/lib/App/AppStore/Fetcher/FetcherBase.php @@ -22,6 +22,7 @@ namespace Test\App\AppStore\Fetcher; use OC\App\AppStore\Fetcher\Fetcher; +use OC\Files\AppData\Factory; use OCP\AppFramework\Utility\ITimeFactory; use OCP\Files\IAppData; use OCP\Files\NotFoundException; @@ -34,6 +35,8 @@ use OCP\IConfig; use Test\TestCase; abstract class FetcherBase extends TestCase { + /** @var Factory|\PHPUnit_Framework_MockObject_MockObject */ + protected $appDataFactory; /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */ protected $appData; /** @var IClientService|\PHPUnit_Framework_MockObject_MockObject */ @@ -51,7 +54,12 @@ abstract class FetcherBase extends TestCase { public function setUp() { parent::setUp(); + $this->appDataFactory = $this->createMock(Factory::class); $this->appData = $this->createMock(IAppData::class); + $this->appDataFactory->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); |