Created DB-level paginator for tags without stats

This commit is contained in:
Alejandro Celaya
2022-01-05 23:30:35 +01:00
parent 6caeb11598
commit 3dd4e33758
5 changed files with 59 additions and 9 deletions

View File

@@ -47,11 +47,13 @@ class TagServiceTest extends TestCase
$expected = [new Tag('foo'), new Tag('bar')];
$match = $this->repo->match(Argument::cetera())->willReturn($expected);
$count = $this->repo->matchSingleScalarResult(Argument::cetera())->willReturn(0);
$result = $this->service->listTags(TagsParams::fromRawData([]));
self::assertEquals($expected, $result->getCurrentPageResults());
$match->shouldHaveBeenCalled();
$count->shouldHaveBeenCalled();
}
/**