Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
0c77cd21f9
commit
b4902369fb
|
@ -53,7 +53,8 @@ class MaintenancePluginTest extends TestCase {
|
||||||
public function testMaintenanceMode() {
|
public function testMaintenanceMode() {
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->exactly(1))
|
->expects($this->exactly(1))
|
||||||
->method('getSystemValue')
|
->method('getSystemValueBool')
|
||||||
|
->with('maintenance')
|
||||||
->will($this->returnValue(true));
|
->will($this->returnValue(true));
|
||||||
|
|
||||||
$this->maintenancePlugin->checkMaintenanceMode();
|
$this->maintenancePlugin->checkMaintenanceMode();
|
||||||
|
|
|
@ -91,7 +91,7 @@ class EncryptAllTest extends TestCase {
|
||||||
$this->appManager->expects($this->once())->method('disableApp')->with('files_trashbin');
|
$this->appManager->expects($this->once())->method('disableApp')->with('files_trashbin');
|
||||||
// enable single user mode to avoid that other user login during encryption
|
// enable single user mode to avoid that other user login during encryption
|
||||||
// destructor should disable the single user mode again
|
// 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(1))->method('setSystemValue')->with('maintenance', true);
|
||||||
$this->config->expects($this->at(2))->method('setSystemValue')->with('maintenance', false);
|
$this->config->expects($this->at(2))->method('setSystemValue')->with('maintenance', false);
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ class ModeTest extends TestCase {
|
||||||
string $expectedOutput
|
string $expectedOutput
|
||||||
) {
|
) {
|
||||||
$this->config->expects($this->any())
|
$this->config->expects($this->any())
|
||||||
->method('getSystemValue')
|
->method('getSystemValueBool')
|
||||||
->willReturn($currentMaintenanceState);
|
->willReturn($currentMaintenanceState);
|
||||||
|
|
||||||
if ($expectedMaintenanceState !== null) {
|
if ($expectedMaintenanceState !== null) {
|
||||||
|
|
Loading…
Reference in New Issue