Fix unit tests

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2019-02-22 08:27:22 +01:00
parent 0c77cd21f9
commit b4902369fb
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
3 changed files with 4 additions and 3 deletions

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

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

View 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) {