Fix unit tests

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/14066/head
Joas Schilling 7 years ago
parent 0c77cd21f9
commit b4902369fb
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
  1. 3
      apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php
  2. 2
      tests/Core/Command/Encryption/EncryptAllTest.php
  3. 2
      tests/Core/Command/Maintenance/ModeTest.php

@ -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();

@ -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);

@ -123,7 +123,7 @@ class ModeTest extends TestCase {
string $expectedOutput
) {
$this->config->expects($this->any())
->method('getSystemValue')
->method('getSystemValueBool')
->willReturn($currentMaintenanceState);
if ($expectedMaintenanceState !== null) {

Loading…
Cancel
Save