Skip to content

Commit

Permalink
#220 Rename constant back to the original name
Browse files Browse the repository at this point in the history
  • Loading branch information
T2L committed Oct 21, 2021
1 parent 2d1936d commit 728438d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class App {

public const PACKAGE_NAME = 'lemberg/draft-environment';

public const LAST_AVAILABLE_UPDATE = 12;
public const LAST_AVAILABLE_UPDATE_WEIGHT = 12;

/**
* @var \Composer\Composer
Expand Down
2 changes: 1 addition & 1 deletion src/Config/Manager/AbstractConfigManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ final protected function setLastAppliedUpdateWeight(array &$config, int $weight)
* @return int
*/
final protected function getLastAvailableUpdateWeight(): int {
return App::LAST_AVAILABLE_UPDATE;
return App::LAST_AVAILABLE_UPDATE_WEIGHT;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final protected function assertVmSettingsContainsLastAppliedUpdate(): void {
$parser = new Parser();
$config = $parser->parseFile("$this->workingDir/vm-settings.yml");

self::assertSame(App::LAST_AVAILABLE_UPDATE, $config['draft']['last_applied_update']);
self::assertSame(App::LAST_AVAILABLE_UPDATE_WEIGHT, $config['draft']['last_applied_update']);
}

}
2 changes: 1 addition & 1 deletion tests/Unit/Config/Manager/InstallManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function testInstall(): void {

$targetConfigFilepath = $configObject->getTargetConfigFilepath(Config::TARGET_CONFIG_FILENAME);
$config = $configObject->readAndParseConfigFromTheFile($targetConfigFilepath);
self::assertSame(App::LAST_AVAILABLE_UPDATE, $config['draft']['last_applied_update']);
self::assertSame(App::LAST_AVAILABLE_UPDATE_WEIGHT, $config['draft']['last_applied_update']);

// Remove target configuration and run installation for the 2nd time.
$this->fs->remove($configObject->getTargetConfigFilepaths());
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Config/Manager/UpdateManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public function testUpdate(): void {

$targetConfigFilepath = $configObject->getTargetConfigFilepath(Config::TARGET_CONFIG_FILENAME);
$config = $configObject->readAndParseConfigFromTheFile($targetConfigFilepath);
self::assertSame(App::LAST_AVAILABLE_UPDATE, $config['draft']['last_applied_update']);
self::assertSame(App::LAST_AVAILABLE_UPDATE_WEIGHT, $config['draft']['last_applied_update']);
}

/**
Expand Down

0 comments on commit 728438d

Please sign in to comment.