[COMPONENT][Feed] Correct queries and introduce new feeds

Refactor feeds and search to use a common query builder
This commit is contained in:
2021-12-23 13:27:31 +00:00
parent 1865d2b41e
commit 7d8cce3b27
27 changed files with 337 additions and 217 deletions

View File

@@ -76,10 +76,10 @@ class FeedsTest extends GNUsocialTestCase
$req_stack = $this->createMock(RequestStack::class);
$feeds = new Feeds($req_stack);
if ($route == 'home') {
static::assertThrows(ClientException::class, fn () => $feeds->home($req, 'username_not_taken'));
static::assertThrows(ClientException::class, fn () => $feeds->home($req));
}
$result = $feeds->{$route}($req, ...$extra_args);
static::assertSame($result['_template'], 'feeds/feed.html.twig');
static::assertSame($result['_template'], 'feed/feed.html.twig');
foreach ($result['notes'] as $n) {
static::assertIsArray($n['replies']);
}