Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-11-24 12:27:58 +0300
committerMorris Jobke <hey@morrisjobke.de>2017-11-25 14:00:57 +0300
commit0e2f00ec59424b2ef5708a928856e2c75abe6deb (patch)
treecbd61c976a34b352bb8377899a244b66ff82f40d /tests/lib/SetupTest.php
parenta97a290fd5ed06dfc33d2adeed5d3b7531674827 (diff)
Get the Installer via DI
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests/lib/SetupTest.php')
-rw-r--r--tests/lib/SetupTest.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/lib/SetupTest.php b/tests/lib/SetupTest.php
index 78c35a5b0bb..e6e9fb5c56c 100644
--- a/tests/lib/SetupTest.php
+++ b/tests/lib/SetupTest.php
@@ -9,6 +9,7 @@
namespace Test;
use bantu\IniGetWrapper\IniGetWrapper;
+use OC\Installer;
use OC\SystemConfig;
use OCP\Defaults;
use OCP\IL10N;
@@ -31,6 +32,8 @@ class SetupTest extends \Test\TestCase {
protected $logger;
/** @var \OCP\Security\ISecureRandom|\PHPUnit_Framework_MockObject_MockObject */
protected $random;
+ /** @var Installer|\PHPUnit_Framework_MockObject_MockObject */
+ protected $installer;
protected function setUp() {
parent::setUp();
@@ -41,9 +44,10 @@ class SetupTest extends \Test\TestCase {
$this->defaults = $this->createMock(Defaults::class);
$this->logger = $this->createMock(ILogger::class);
$this->random = $this->createMock(ISecureRandom::class);
+ $this->installer = $this->createMock(Installer::class);
$this->setupClass = $this->getMockBuilder('\OC\Setup')
->setMethods(['class_exists', 'is_callable', 'getAvailableDbDriversForPdo'])
- ->setConstructorArgs([$this->config, $this->iniWrapper, $this->l10n, $this->defaults, $this->logger, $this->random])
+ ->setConstructorArgs([$this->config, $this->iniWrapper, $this->l10n, $this->defaults, $this->logger, $this->random, $this->installer])
->getMock();
}