]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix unit tests 4824/head
authorJoas Schilling <coding@schilljs.com>
Fri, 12 May 2017 08:02:15 +0000 (10:02 +0200)
committerJoas Schilling <coding@schilljs.com>
Fri, 12 May 2017 08:02:15 +0000 (10:02 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php
tests/lib/App/AppStore/Fetcher/FetcherBase.php

index f3769fc09c36df56a9a5ef0fef17ae0576b3ff69..2efecef4dc77898dab7a81d6e6ad478db179d11e 100644 (file)
@@ -32,6 +32,7 @@ use OCP\Http\Client\IClient;
 use OCP\Http\Client\IClientService;
 use OCP\Http\Client\IResponse;
 use OCP\IConfig;
+use OCP\ILogger;
 use Test\TestCase;
 
 class AppFetcherTest extends TestCase  {
@@ -43,6 +44,8 @@ class AppFetcherTest extends TestCase  {
        protected $timeFactory;
        /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
        protected $config;
+       /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+       protected $logger;
        /** @var AppFetcher */
        protected $fetcher;
        /** @var string */
@@ -64,6 +67,7 @@ EOD;
                $this->clientService = $this->createMock(IClientService::class);
                $this->timeFactory = $this->createMock(ITimeFactory::class);
                $this->config = $this->createMock(IConfig::class);
+               $this->logger = $this->createMock(ILogger::class);
 
                $this->config
                        ->expects($this->at(0))
@@ -74,7 +78,8 @@ EOD;
                        $factory,
                        $this->clientService,
                        $this->timeFactory,
-                       $this->config
+                       $this->config,
+                       $this->logger
                );
        }
 
index 6143da662dc9c4735ce7a70a612a13c75e679c0e..a1ce718520fa94bc53144d66a59c73b2cc5ab5d3 100644 (file)
@@ -33,7 +33,8 @@ class CategoryFetcherTest extends FetcherBase {
                        $this->appDataFactory,
                        $this->clientService,
                        $this->timeFactory,
-                       $this->config
+                       $this->config,
+                       $this->logger
                );
        }
 
index 3d89ae942abdbe559374efe03849c9e0c07a9529..bd19141ea9f227f19ecc06c27dc14a60569260ff 100644 (file)
@@ -32,6 +32,7 @@ use OCP\Http\Client\IClient;
 use OCP\Http\Client\IClientService;
 use OCP\Http\Client\IResponse;
 use OCP\IConfig;
+use OCP\ILogger;
 use Test\TestCase;
 
 abstract class FetcherBase extends TestCase {
@@ -45,6 +46,8 @@ abstract class FetcherBase extends TestCase {
        protected $timeFactory;
        /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
        protected $config;
+       /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+       protected $logger;
        /** @var Fetcher */
        protected $fetcher;
        /** @var string */
@@ -63,6 +66,7 @@ abstract class FetcherBase extends TestCase {
                $this->clientService = $this->createMock(IClientService::class);
                $this->timeFactory = $this->createMock(ITimeFactory::class);
                $this->config = $this->createMock(IConfig::class);
+               $this->logger = $this->createMock(ILogger::class);
        }
 
        public function testGetWithAlreadyExistingFileAndUpToDateTimestampAndVersion() {