Fixed coding styles

This commit is contained in:
Alejandro Celaya 2022-10-23 23:07:50 +02:00
parent ef82158368
commit da658185c3
2 changed files with 3 additions and 4 deletions

View File

@ -57,7 +57,7 @@ class VisitsStatsHelperTest extends TestCase
$expectedCount * 3, $expectedCount * 3,
); );
$repo->expects($this->once())->method('countOrphanVisits')->with( $repo->expects($this->once())->method('countOrphanVisits')->with(
$this->isInstanceOf(VisitsCountFiltering::class) $this->isInstanceOf(VisitsCountFiltering::class),
)->willReturn($expectedCount); )->willReturn($expectedCount);
$this->em->expects($this->once())->method('getRepository')->with(Visit::class)->willReturn($repo); $this->em->expects($this->once())->method('getRepository')->with(Visit::class)->willReturn($repo);
@ -92,7 +92,7 @@ class VisitsStatsHelperTest extends TestCase
)->willReturn($list); )->willReturn($list);
$repo2->method('countVisitsByShortCode')->with( $repo2->method('countVisitsByShortCode')->with(
$identifier, $identifier,
$this->isInstanceOf(VisitsCountFiltering::class) $this->isInstanceOf(VisitsCountFiltering::class),
)->willReturn(1); )->willReturn(1);
$this->em->expects($this->exactly(2))->method('getRepository')->willReturnMap([ $this->em->expects($this->exactly(2))->method('getRepository')->willReturnMap([

View File

@ -33,7 +33,7 @@ class VisitsTrackerTest extends TestCase
public function trackPersistsVisitAndDispatchesEvent(string $method, array $args): void public function trackPersistsVisitAndDispatchesEvent(string $method, array $args): void
{ {
$this->em->expects($this->once())->method('persist')->with( $this->em->expects($this->once())->method('persist')->with(
$this->callback(fn (Visit $visit) => $visit->setId('1') !== null) $this->callback(fn (Visit $visit) => $visit->setId('1') !== null),
); );
$this->em->expects($this->once())->method('flush'); $this->em->expects($this->once())->method('flush');
$this->eventDispatcher->expects($this->once())->method('dispatch')->with( $this->eventDispatcher->expects($this->once())->method('dispatch')->with(
@ -41,7 +41,6 @@ class VisitsTrackerTest extends TestCase
); );
$this->visitsTracker()->{$method}(...$args); $this->visitsTracker()->{$method}(...$args);
} }
/** /**