mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-16 13:58:45 +02:00
ci: fix tests and code style
This commit is contained in:
@@ -648,7 +648,8 @@ class RunTimeEnvironment
|
||||
}
|
||||
}
|
||||
|
||||
public function SetDbUUID() : void {
|
||||
public function SetDbUUID(): void
|
||||
{
|
||||
// Set a DBProperty with a unique ID to identify this instance of iTop
|
||||
$sUUID = DBProperty::GetProperty('database_uuid', '');
|
||||
if ($sUUID === '') {
|
||||
|
||||
@@ -134,11 +134,11 @@ class ApplicationInstallSequencer extends StepSequencer
|
||||
$aSelectedExtensionCodes,
|
||||
$sInstallComment
|
||||
);
|
||||
$this->oRunTimeEnvironment->ExitReadOnlyMode();
|
||||
return $this->ComputeNextStep($sStep);
|
||||
|
||||
case 'commit':
|
||||
$this->oRunTimeEnvironment->Commit();
|
||||
$this->oRunTimeEnvironment->ExitReadOnlyMode();
|
||||
return $this->GetNextStep('', 'Completed', 100);
|
||||
|
||||
default:
|
||||
|
||||
@@ -35,7 +35,7 @@ class DataAuditSequencer extends StepSequencer
|
||||
{
|
||||
try {
|
||||
$fStart = microtime(true);
|
||||
|
||||
|
||||
/**
|
||||
* @since 3.2.0 move the ContextTag init at the very beginning of the method
|
||||
* @noinspection PhpUnusedLocalVariableInspection
|
||||
|
||||
@@ -306,7 +306,6 @@ class ApplicationInstallerSequencerTest extends ItopTestCase
|
||||
$this->GivenApplicationInstallSequencer($aAdditionalParams);
|
||||
$this->oRunTimeEnvironment->expects($this->once())->method('DoCreateConfig')
|
||||
->with($this->oConfig, "6.6.6", ["a" => "b"], ["c" => "d"], null);
|
||||
$this->oRunTimeEnvironment->expects($this->once())->method('ExitReadOnlyMode');
|
||||
|
||||
$aRes = $this->oSequencer->ExecuteStep('create-config');
|
||||
$aExpected = [
|
||||
@@ -322,6 +321,9 @@ class ApplicationInstallerSequencerTest extends ItopTestCase
|
||||
public function testCommit()
|
||||
{
|
||||
$this->GivenApplicationInstallSequencer();
|
||||
$this->oRunTimeEnvironment->expects($this->once())->method('Commit');
|
||||
$this->oRunTimeEnvironment->expects($this->once())->method('ExitReadOnlyMode');
|
||||
|
||||
$aRes = $this->oSequencer->ExecuteStep('commit');
|
||||
$aExpected = [
|
||||
'message' => '',
|
||||
|
||||
Reference in New Issue
Block a user