aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-05-12 10:02:15 +0200
committerJoas Schilling <coding@schilljs.com>2017-05-12 10:02:15 +0200
commite6a0ad470115e902b2c82d5694b9c4bd00167f35 (patch)
tree178643214641c6a0d6a138d65806d577f8961112 /tests
parentc90d832ce4ab076a7d01e9d223b54a5e5ce4e7d4 (diff)
downloadnextcloud-server-e6a0ad470115e902b2c82d5694b9c4bd00167f35.tar.gz
nextcloud-server-e6a0ad470115e902b2c82d5694b9c4bd00167f35.zip
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/App/AppStore/Fetcher/AppFetcherTest.php7
-rw-r--r--tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php3
-rw-r--r--tests/lib/App/AppStore/Fetcher/FetcherBase.php4
3 files changed, 12 insertions, 2 deletions
diff --git a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
index f3769fc09c3..2efecef4dc7 100644
--- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
+++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
@@ -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
);
}
diff --git a/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php b/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php
index 6143da662dc..a1ce718520f 100644
--- a/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php
+++ b/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php
@@ -33,7 +33,8 @@ class CategoryFetcherTest extends FetcherBase {
$this->appDataFactory,
$this->clientService,
$this->timeFactory,
- $this->config
+ $this->config,
+ $this->logger
);
}
diff --git a/tests/lib/App/AppStore/Fetcher/FetcherBase.php b/tests/lib/App/AppStore/Fetcher/FetcherBase.php
index 3d89ae942ab..bd19141ea9f 100644
--- a/tests/lib/App/AppStore/Fetcher/FetcherBase.php
+++ b/tests/lib/App/AppStore/Fetcher/FetcherBase.php
@@ -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() {