Skip to content

Commit 1c635a4

Browse files
committed
ArgumentCountError: Too few arguments to function OCA\Settings\Controller\CheckSetupController::__construct()
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent b09af4c commit 1c635a4

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

apps/settings/tests/Controller/CheckSetupControllerTest.php

+29-18
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
use OCP\ITempManager;
5656
use OCP\IURLGenerator;
5757
use OCP\Lock\ILockingProvider;
58+
use OCP\Notification\IManager;
5859
use PHPUnit\Framework\MockObject\MockObject;
5960
use Psr\Http\Message\ResponseInterface;
6061
use Psr\Log\LoggerInterface;
@@ -102,6 +103,8 @@ class CheckSetupControllerTest extends TestCase {
102103
private $connection;
103104
/** @var ITempManager|\PHPUnit\Framework\MockObject\MockObject */
104105
private $tempManager;
106+
/** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
107+
private $notificationManager;
105108

106109
/**
107110
* Holds a list of directories created during tests.
@@ -145,6 +148,7 @@ protected function setUp(): void {
145148
$this->connection = $this->getMockBuilder(IDBConnection::class)
146149
->disableOriginalConstructor()->getMock();
147150
$this->tempManager = $this->getMockBuilder(ITempManager::class)->getMock();
151+
$this->notificationManager = $this->getMockBuilder(IManager::class)->getMock();
148152
$this->checkSetupController = $this->getMockBuilder(CheckSetupController::class)
149153
->setConstructorArgs([
150154
'settings',
@@ -164,6 +168,7 @@ protected function setUp(): void {
164168
$this->iniGetWrapper,
165169
$this->connection,
166170
$this->tempManager,
171+
$this->notificationManager,
167172
])
168173
->setMethods([
169174
'isReadOnlyConfig',
@@ -669,6 +674,8 @@ public function testGetCurlVersion() {
669674
$this->secureRandom,
670675
$this->iniGetWrapper,
671676
$this->connection,
677+
$this->tempManager,
678+
$this->notificationManager,
672679
])
673680
->setMethods(null)->getMock();
674681

@@ -1423,23 +1430,25 @@ public function testIsMysqlUsedWithoutUTF8MB4(string $db, bool $useUTF8MB4, bool
14231430
});
14241431

14251432
$checkSetupController = new CheckSetupController(
1426-
'settings',
1427-
$this->request,
1428-
$this->config,
1429-
$this->clientService,
1430-
$this->urlGenerator,
1431-
$this->l10n,
1432-
$this->checker,
1433-
$this->logger,
1434-
$this->dispatcher,
1435-
$this->db,
1436-
$this->lockingProvider,
1437-
$this->dateTimeFormatter,
1438-
$this->memoryInfo,
1439-
$this->secureRandom,
1440-
$this->iniGetWrapper,
1441-
$this->connection
1442-
);
1433+
'settings',
1434+
$this->request,
1435+
$this->config,
1436+
$this->clientService,
1437+
$this->urlGenerator,
1438+
$this->l10n,
1439+
$this->checker,
1440+
$this->logger,
1441+
$this->dispatcher,
1442+
$this->db,
1443+
$this->lockingProvider,
1444+
$this->dateTimeFormatter,
1445+
$this->memoryInfo,
1446+
$this->secureRandom,
1447+
$this->iniGetWrapper,
1448+
$this->connection,
1449+
$this->tempManager,
1450+
$this->notificationManager
1451+
);
14431452

14441453
$this->assertSame($expected, $this->invokePrivate($checkSetupController, 'isMysqlUsedWithoutUTF8MB4'));
14451454
}
@@ -1488,7 +1497,9 @@ public function testIsEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed(string $m
14881497
$this->memoryInfo,
14891498
$this->secureRandom,
14901499
$this->iniGetWrapper,
1491-
$this->connection
1500+
$this->connection,
1501+
$this->tempManager,
1502+
$this->notificationManager
14921503
);
14931504

14941505
$this->assertSame($expected, $this->invokePrivate($checkSetupController, 'isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed'));

0 commit comments

Comments
 (0)