summaryrefslogtreecommitdiffstats
path: root/apps/settings/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-08-20 16:35:14 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-08-20 16:35:38 +0200
commit9e483ea9495288cd8d38d4d3570da6fd53e3970c (patch)
tree76aaba876cfa7b3b6fe2c289b7908bdf90d22a84 /apps/settings/tests
parent567e99abe29024742c168d85d3ce0f5030f7c7a2 (diff)
downloadnextcloud-server-9e483ea9495288cd8d38d4d3570da6fd53e3970c.tar.gz
nextcloud-server-9e483ea9495288cd8d38d4d3570da6fd53e3970c.zip
Fix unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/settings/tests')
-rw-r--r--apps/settings/tests/Controller/CheckSetupControllerTest.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php
index a1f7e8aa83f..0bfecd05b9a 100644
--- a/apps/settings/tests/Controller/CheckSetupControllerTest.php
+++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php
@@ -35,6 +35,7 @@
namespace OCA\Settings\Tests\Controller;
+use bantu\IniGetWrapper\IniGetWrapper;
use OC;
use OC\DB\Connection;
use OC\IntegrityCheck\Checker;
@@ -93,6 +94,8 @@ class CheckSetupControllerTest extends TestCase {
private $memoryInfo;
/** @var SecureRandom|\PHPUnit\Framework\MockObject\MockObject */
private $secureRandom;
+ /** @var IniGetWrapper|\PHPUnit\Framework\MockObject\MockObject */
+ private $iniGetWrapper;
/**
* Holds a list of directories created during tests.
@@ -132,6 +135,7 @@ class CheckSetupControllerTest extends TestCase {
->setMethods(['isMemoryLimitSufficient',])
->getMock();
$this->secureRandom = $this->getMockBuilder(SecureRandom::class)->getMock();
+ $this->iniGetWrapper = $this->getMockBuilder(IniGetWrapper::class)->getMock();
$this->checkSetupController = $this->getMockBuilder(CheckSetupController::class)
->setConstructorArgs([
'settings',
@@ -148,6 +152,7 @@ class CheckSetupControllerTest extends TestCase {
$this->dateTimeFormatter,
$this->memoryInfo,
$this->secureRandom,
+ $this->iniGetWrapper,
])
->setMethods([
'isReadOnlyConfig',
@@ -618,6 +623,7 @@ class CheckSetupControllerTest extends TestCase {
$this->dateTimeFormatter,
$this->memoryInfo,
$this->secureRandom,
+ $this->iniGetWrapper,
])
->setMethods(null)->getMock();
@@ -651,6 +657,7 @@ class CheckSetupControllerTest extends TestCase {
$this->dateTimeFormatter,
$this->memoryInfo,
$this->secureRandom,
+ $this->iniGetWrapper,
])
->setMethods(null)->getMock();
@@ -1418,7 +1425,8 @@ Array
$this->lockingProvider,
$this->dateTimeFormatter,
$this->memoryInfo,
- $this->secureRandom
+ $this->secureRandom,
+ $this->iniGetWrapper
);
$this->assertSame($expected, $this->invokePrivate($checkSetupController, 'isMysqlUsedWithoutUTF8MB4'));
@@ -1466,7 +1474,8 @@ Array
$this->lockingProvider,
$this->dateTimeFormatter,
$this->memoryInfo,
- $this->secureRandom
+ $this->secureRandom,
+ $this->iniGetWrapper
);
$this->assertSame($expected, $this->invokePrivate($checkSetupController, 'isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed'));