mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-05 17:14:20 +01:00
call cron asynchronously + tests
This commit is contained in:
@@ -976,7 +976,7 @@ abstract class ItopDataTestCase extends ItopTestCase
|
||||
|
||||
protected function AssertLastErrorLogEntryContains(string $sNeedle, string $sMessage = ''): void
|
||||
{
|
||||
$aLastLines = self::ReadTail(APPROOT.'/log/error.log');
|
||||
$aLastLines = Utils::ReadTail(APPROOT.'/log/error.log');
|
||||
$this->assertStringContainsString($sNeedle, $aLastLines[0], $sMessage);
|
||||
}
|
||||
|
||||
@@ -1470,4 +1470,21 @@ abstract class ItopDataTestCase extends ItopTestCase
|
||||
@chmod($sConfigPath, 0440);
|
||||
@unlink($this->sConfigTmpBackupFile);
|
||||
}
|
||||
|
||||
protected function AddLoginModeAndSaveConfiguration($sLoginMode)
|
||||
{
|
||||
$aAllowedLoginTypes = $this->oiTopConfig->GetAllowedLoginTypes();
|
||||
if (!in_array($sLoginMode, $aAllowedLoginTypes)) {
|
||||
$aAllowedLoginTypes[] = $sLoginMode;
|
||||
$this->oiTopConfig->SetAllowedLoginTypes($aAllowedLoginTypes);
|
||||
$this->SaveItopConfFile();
|
||||
}
|
||||
}
|
||||
|
||||
private function SaveItopConfFile()
|
||||
{
|
||||
@chmod($this->oiTopConfig->GetLoadedFile(), 0770);
|
||||
$this->oiTopConfig->WriteToFile();
|
||||
@chmod($this->oiTopConfig->GetLoadedFile(), 0440);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user