]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix unit tests 14066/head
authorJoas Schilling <coding@schilljs.com>
Fri, 22 Feb 2019 07:27:22 +0000 (08:27 +0100)
committerJoas Schilling <coding@schilljs.com>
Fri, 22 Feb 2019 08:08:53 +0000 (09:08 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php
tests/Core/Command/Encryption/EncryptAllTest.php
tests/Core/Command/Maintenance/ModeTest.php

index d4cc00f1582426def9bd54de1f7e5792cacd140d..5a1a4619ead4f64fb87df351863d5c899a756579 100644 (file)
@@ -53,7 +53,8 @@ class MaintenancePluginTest extends TestCase {
        public function testMaintenanceMode() {
                $this->config
                        ->expects($this->exactly(1))
-                       ->method('getSystemValue')
+                       ->method('getSystemValueBool')
+                       ->with('maintenance')
                        ->will($this->returnValue(true));
 
                $this->maintenancePlugin->checkMaintenanceMode();
index ca7b264c98ff8c2cf8df0ec487b1656473c4cd74..c6af7e387227d317cdfc5a57c93ae977a12d984c 100644 (file)
@@ -91,7 +91,7 @@ class EncryptAllTest extends TestCase {
                $this->appManager->expects($this->once())->method('disableApp')->with('files_trashbin');
                // enable single user mode to avoid that other user login during encryption
                // destructor should disable the single user mode again
-               $this->config->expects($this->once())->method('getSystemValue')->with('maintenance', false)->willReturn(false);
+               $this->config->expects($this->once())->method('getSystemValueBool')->with('maintenance', false)->willReturn(false);
                $this->config->expects($this->at(1))->method('setSystemValue')->with('maintenance', true);
                $this->config->expects($this->at(2))->method('setSystemValue')->with('maintenance', false);
 
index da5e95998e9543c1e87577e71696942636f11f4a..895a06bbec195daf5ce61f78a212928b370cf65d 100644 (file)
@@ -123,7 +123,7 @@ class ModeTest extends TestCase {
                string $expectedOutput
        ) {
                $this->config->expects($this->any())
-                       ->method('getSystemValue')
+                       ->method('getSystemValueBool')
                        ->willReturn($currentMaintenanceState);
 
                if ($expectedMaintenanceState !== null) {