mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Ensured events triggered as a result of a new visit are never skipped
This commit is contained in:
@@ -97,7 +97,7 @@ class LocateVisitTest extends TestCase
|
||||
$this->em->flush()->shouldNotHaveBeenCalled();
|
||||
$this->ipLocationResolver->resolveIpLocation(Argument::cetera())->shouldNotHaveBeenCalled();
|
||||
$logWarning->shouldHaveBeenCalled();
|
||||
$dispatch->shouldNotHaveBeenCalled();
|
||||
$dispatch->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
|
||||
/** @test */
|
||||
|
||||
@@ -84,6 +84,10 @@ class UpdateGeoLiteDbTest extends TestCase
|
||||
$checkDbUpdate = $this->dbUpdater->checkDbUpdate(Argument::cetera())->will(
|
||||
function (array $args) use ($total, $downloaded, $oldDbExists): void {
|
||||
[, $secondCallback] = $args;
|
||||
|
||||
// Invoke several times to ensure the log is printed only once
|
||||
$secondCallback($total, $downloaded, $oldDbExists);
|
||||
$secondCallback($total, $downloaded, $oldDbExists);
|
||||
$secondCallback($total, $downloaded, $oldDbExists);
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user