Browse Source

ArgumentCountError: Too few arguments to function OCA\Settings\Controller\CheckSetupController::__construct()

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/29522/head
Joas Schilling 4 years ago
parent
commit
e8f7a08e52
No known key found for this signature in database GPG Key ID: 7076EA9751AACDDA
  1. 15
      apps/settings/tests/Controller/CheckSetupControllerTest.php

15
apps/settings/tests/Controller/CheckSetupControllerTest.php

@ -55,6 +55,7 @@ use OCP\IRequest;
use OCP\ITempManager; use OCP\ITempManager;
use OCP\IURLGenerator; use OCP\IURLGenerator;
use OCP\Lock\ILockingProvider; use OCP\Lock\ILockingProvider;
use OCP\Notification\IManager;
use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\MockObject\MockObject;
use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ResponseInterface;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
@ -102,6 +103,8 @@ class CheckSetupControllerTest extends TestCase {
private $connection; private $connection;
/** @var ITempManager|\PHPUnit\Framework\MockObject\MockObject */ /** @var ITempManager|\PHPUnit\Framework\MockObject\MockObject */
private $tempManager; private $tempManager;
/** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
private $notificationManager;
/** /**
* Holds a list of directories created during tests. * Holds a list of directories created during tests.
@ -145,6 +148,7 @@ class CheckSetupControllerTest extends TestCase {
$this->connection = $this->getMockBuilder(IDBConnection::class) $this->connection = $this->getMockBuilder(IDBConnection::class)
->disableOriginalConstructor()->getMock(); ->disableOriginalConstructor()->getMock();
$this->tempManager = $this->getMockBuilder(ITempManager::class)->getMock(); $this->tempManager = $this->getMockBuilder(ITempManager::class)->getMock();
$this->notificationManager = $this->getMockBuilder(IManager::class)->getMock();
$this->checkSetupController = $this->getMockBuilder(CheckSetupController::class) $this->checkSetupController = $this->getMockBuilder(CheckSetupController::class)
->setConstructorArgs([ ->setConstructorArgs([
'settings', 'settings',
@ -164,6 +168,7 @@ class CheckSetupControllerTest extends TestCase {
$this->iniGetWrapper, $this->iniGetWrapper,
$this->connection, $this->connection,
$this->tempManager, $this->tempManager,
$this->notificationManager,
]) ])
->setMethods([ ->setMethods([
'isReadOnlyConfig', 'isReadOnlyConfig',
@ -669,6 +674,8 @@ class CheckSetupControllerTest extends TestCase {
$this->secureRandom, $this->secureRandom,
$this->iniGetWrapper, $this->iniGetWrapper,
$this->connection, $this->connection,
$this->tempManager,
$this->notificationManager,
]) ])
->setMethods(null)->getMock(); ->setMethods(null)->getMock();
@ -1438,7 +1445,9 @@ Array
$this->memoryInfo, $this->memoryInfo,
$this->secureRandom, $this->secureRandom,
$this->iniGetWrapper, $this->iniGetWrapper,
$this->connection
$this->connection,
$this->tempManager,
$this->notificationManager
); );
$this->assertSame($expected, $this->invokePrivate($checkSetupController, 'isMysqlUsedWithoutUTF8MB4')); $this->assertSame($expected, $this->invokePrivate($checkSetupController, 'isMysqlUsedWithoutUTF8MB4'));
@ -1488,7 +1497,9 @@ Array
$this->memoryInfo, $this->memoryInfo,
$this->secureRandom, $this->secureRandom,
$this->iniGetWrapper, $this->iniGetWrapper,
$this->connection
$this->connection,
$this->tempManager,
$this->notificationManager
); );
$this->assertSame($expected, $this->invokePrivate($checkSetupController, 'isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed')); $this->assertSame($expected, $this->invokePrivate($checkSetupController, 'isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed'));

Loading…
Cancel
Save