Skip to content
Snippets Groups Projects
Commit 023d9416 authored by Ludovic Ganée's avatar Ludovic Ganée
Browse files

correction test

parent 9a6b2aca
No related branches found
No related tags found
No related merge requests found
Pipeline #80624 failed
...@@ -20,6 +20,9 @@ class MaintenanceCommandTest extends TestCase ...@@ -20,6 +20,9 @@ class MaintenanceCommandTest extends TestCase
$this->useCommandRunner(); $this->useCommandRunner();
$this->initialPathToLocal = Configure::read('App.paths.path_to_local_config', ''); $this->initialPathToLocal = Configure::read('App.paths.path_to_local_config', '');
if (!is_dir(TMP_TESTDIR)) {
mkdir(TMP_TESTDIR, 0755, true);
}
$pathToLocalConfigFile = TMP_TESTDIR.DS.'path_to_local.php'; $pathToLocalConfigFile = TMP_TESTDIR.DS.'path_to_local.php';
$appLocalJsonFile = TMP_TESTDIR.DS.'test_local.json'; $appLocalJsonFile = TMP_TESTDIR.DS.'test_local.json';
file_put_contents($appLocalJsonFile, '{}'); file_put_contents($appLocalJsonFile, '{}');
...@@ -213,7 +216,7 @@ class MaintenanceCommandTest extends TestCase ...@@ -213,7 +216,7 @@ class MaintenanceCommandTest extends TestCase
public function testUnsetPeriodic() public function testUnsetPeriodic()
{ {
$this->distinctExec("maintenance periodic 02:00:00 03:00:00"); $this->distinctExec("maintenance periodic 02:00:00 03:00:00");
$this->distinctExec("maintenance unset_periodic"); $this->distinctExec("maintenance unset periodic");
$this->assertEmpty(Configure::read('Interruption.periodic.begin')); $this->assertEmpty(Configure::read('Interruption.periodic.begin'));
$this->assertEmpty(Configure::read('Interruption.periodic.end')); $this->assertEmpty(Configure::read('Interruption.periodic.end'));
} }
...@@ -221,7 +224,7 @@ class MaintenanceCommandTest extends TestCase ...@@ -221,7 +224,7 @@ class MaintenanceCommandTest extends TestCase
public function testUnsetScheduled() public function testUnsetScheduled()
{ {
$this->distinctExec("maintenance scheduled now tomorrow"); $this->distinctExec("maintenance scheduled now tomorrow");
$this->distinctExec("maintenance unset_scheduled"); $this->distinctExec("maintenance unset scheduled");
$this->assertEmpty(Configure::read('Interruption.scheduled.begin')); $this->assertEmpty(Configure::read('Interruption.scheduled.begin'));
$this->assertEmpty(Configure::read('Interruption.scheduled.end')); $this->assertEmpty(Configure::read('Interruption.scheduled.end'));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment