Handle differently when trying to update geolocation and already in progress

This commit is contained in:
Alejandro Celaya
2024-12-15 12:03:01 +01:00
parent 853c50a819
commit 72a962ec6d
4 changed files with 19 additions and 1 deletions

View File

@@ -77,6 +77,7 @@ class DownloadGeoLiteDbCommandTest extends TestCase
#[Test]
#[TestWith([GeolocationResult::LICENSE_MISSING, 'It was not possible to download GeoLite2 db'])]
#[TestWith([GeolocationResult::MAX_ERRORS_REACHED, 'Max consecutive errors reached'])]
#[TestWith([GeolocationResult::UPDATE_IN_PROGRESS, 'A geolocation db is already being downloaded'])]
public function warningIsPrintedForSomeResults(GeolocationResult $result, string $expectedWarningMessage): void
{
$this->dbUpdater->expects($this->once())->method('checkDbUpdate')->withAnyParameters()->willReturn($result);