From ea4b7bac7a4dcd619efad91fc6c7e813ed344d64 Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 15 Sep 2021 21:21:20 +0200 Subject: [PATCH] Issue 16719: CheckSetupController.php: now injecting reference to ITempManager, rather than obtaining using it manually Signed-off-by: Stefan --- apps/settings/tests/Controller/CheckSetupControllerTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php index 5cfab1ccf2d..1924ddda951 100644 --- a/apps/settings/tests/Controller/CheckSetupControllerTest.php +++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php @@ -52,6 +52,7 @@ use OCP\IDateTimeFormatter; use OCP\IDBConnection; use OCP\IL10N; use OCP\IRequest; +use OCP\ITempManager; use OCP\IURLGenerator; use OCP\Lock\ILockingProvider; use PHPUnit\Framework\MockObject\MockObject; @@ -99,6 +100,8 @@ class CheckSetupControllerTest extends TestCase { private $iniGetWrapper; /** @var IDBConnection|\PHPUnit\Framework\MockObject\MockObject */ private $connection; + /** @var ITempManager|\PHPUnit\Framework\MockObject\MockObject */ + private $tempManager; /** * Holds a list of directories created during tests. @@ -141,6 +144,7 @@ class CheckSetupControllerTest extends TestCase { $this->iniGetWrapper = $this->getMockBuilder(IniGetWrapper::class)->getMock(); $this->connection = $this->getMockBuilder(IDBConnection::class) ->disableOriginalConstructor()->getMock(); + $this->tempManager = $this->getMockBuilder(ITempManager::class)->getMock(); $this->checkSetupController = $this->getMockBuilder(CheckSetupController::class) ->setConstructorArgs([ 'settings', @@ -159,6 +163,7 @@ class CheckSetupControllerTest extends TestCase { $this->secureRandom, $this->iniGetWrapper, $this->connection, + $this->tempManager, ]) ->setMethods([ 'isReadOnlyConfig', @@ -181,6 +186,7 @@ class CheckSetupControllerTest extends TestCase { 'hasBigIntConversionPendingColumns', 'isMysqlUsedWithoutUTF8MB4', 'isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed', + 'isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed', ])->getMock(); }