Fix ImportedLinksProcessorTest

This commit is contained in:
Alejandro Celaya
2024-12-22 18:24:56 +01:00
parent 2f39aff2fe
commit 2807b9ce2f
11 changed files with 80 additions and 16 deletions

View File

@@ -74,7 +74,7 @@ class DeleteShortUrlCommandTest extends TestCase
$identifier = ShortUrlIdentifier::fromShortCodeAndDomain($shortCode);
$this->service->expects($this->exactly($expectedDeleteCalls))->method('deleteByShortCode')->with(
$identifier,
$this->isType('bool'),
$this->isBool(),
)->willReturnCallback(function ($_, bool $ignoreThreshold) use ($shortCode): void {
if (!$ignoreThreshold) {
throw Exception\DeleteShortUrlException::fromVisitsThreshold(

View File

@@ -47,7 +47,7 @@ class LocateVisitsCommandTest extends TestCase
$locker = $this->createMock(Lock\LockFactory::class);
$this->lock = $this->createMock(Lock\SharedLockInterface::class);
$locker->method('createLock')->with($this->isType('string'), 600.0, false)->willReturn($this->lock);
$locker->method('createLock')->with($this->isString(), 600.0, false)->willReturn($this->lock);
$command = new LocateVisitsCommand($this->visitService, $this->visitToLocation, $locker);

View File

@@ -77,7 +77,7 @@ class RedirectRuleHandlerTest extends TestCase
$this->io->expects($this->once())->method('choice')->willReturn($action->value);
$this->io->expects($this->never())->method('newLine');
$this->io->expects($this->never())->method('text');
$this->io->expects($this->once())->method('table')->with($this->isType('array'), [
$this->io->expects($this->once())->method('table')->with($this->isArray(), [
['1', $comment($this->cond1->toHumanFriendly()), 'https://example.com/one'],
[
'2',