55
55
use OCP \ITempManager ;
56
56
use OCP \IURLGenerator ;
57
57
use OCP \Lock \ILockingProvider ;
58
+ use OCP \Notification \IManager ;
58
59
use PHPUnit \Framework \MockObject \MockObject ;
59
60
use Psr \Http \Message \ResponseInterface ;
60
61
use Psr \Log \LoggerInterface ;
@@ -102,6 +103,8 @@ class CheckSetupControllerTest extends TestCase {
102
103
private $ connection ;
103
104
/** @var ITempManager|\PHPUnit\Framework\MockObject\MockObject */
104
105
private $ tempManager ;
106
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
107
+ private $ notificationManager ;
105
108
106
109
/**
107
110
* Holds a list of directories created during tests.
@@ -145,6 +148,7 @@ protected function setUp(): void {
145
148
$ this ->connection = $ this ->getMockBuilder (IDBConnection::class)
146
149
->disableOriginalConstructor ()->getMock ();
147
150
$ this ->tempManager = $ this ->getMockBuilder (ITempManager::class)->getMock ();
151
+ $ this ->notificationManager = $ this ->getMockBuilder (IManager::class)->getMock ();
148
152
$ this ->checkSetupController = $ this ->getMockBuilder (CheckSetupController::class)
149
153
->setConstructorArgs ([
150
154
'settings ' ,
@@ -164,6 +168,7 @@ protected function setUp(): void {
164
168
$ this ->iniGetWrapper ,
165
169
$ this ->connection ,
166
170
$ this ->tempManager ,
171
+ $ this ->notificationManager ,
167
172
])
168
173
->setMethods ([
169
174
'isReadOnlyConfig ' ,
@@ -669,6 +674,8 @@ public function testGetCurlVersion() {
669
674
$ this ->secureRandom ,
670
675
$ this ->iniGetWrapper ,
671
676
$ this ->connection ,
677
+ $ this ->tempManager ,
678
+ $ this ->notificationManager ,
672
679
])
673
680
->setMethods (null )->getMock ();
674
681
@@ -1423,23 +1430,25 @@ public function testIsMysqlUsedWithoutUTF8MB4(string $db, bool $useUTF8MB4, bool
1423
1430
});
1424
1431
1425
1432
$ 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
+ );
1443
1452
1444
1453
$ this ->assertSame ($ expected , $ this ->invokePrivate ($ checkSetupController , 'isMysqlUsedWithoutUTF8MB4 ' ));
1445
1454
}
@@ -1488,7 +1497,9 @@ public function testIsEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed(string $m
1488
1497
$ this ->memoryInfo ,
1489
1498
$ this ->secureRandom ,
1490
1499
$ this ->iniGetWrapper ,
1491
- $ this ->connection
1500
+ $ this ->connection ,
1501
+ $ this ->tempManager ,
1502
+ $ this ->notificationManager
1492
1503
);
1493
1504
1494
1505
$ this ->assertSame ($ expected , $ this ->invokePrivate ($ checkSetupController , 'isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed ' ));
0 commit comments