forked from wallabag/wallabag
Add tests for tag list routes
This commit is contained in:
committed by
Jeremy Benoist
parent
371bcca0f6
commit
267e8d6361
@ -105,7 +105,11 @@ class TagController extends Controller
|
||||
*/
|
||||
public function showEntriesForTagAction(Tag $tag, $page, Request $request)
|
||||
{
|
||||
$pagerAdapter = new ArrayAdapter($tag->getEntries()->toArray());
|
||||
$entriesByTag = $this->getDoctrine()
|
||||
->getRepository('WallabagCoreBundle:Entry')
|
||||
->findAllByTagId($this->getUser()->getId(), $tag->getId());
|
||||
|
||||
$pagerAdapter = new ArrayAdapter($entriesByTag);
|
||||
|
||||
$entries = $this->get('wallabag_core.helper.prepare_pager_for_entries')
|
||||
->prepare($pagerAdapter, $page);
|
||||
|
||||
@ -28,6 +28,13 @@ class LoadTagData extends AbstractFixture implements OrderedFixtureInterface
|
||||
|
||||
$this->addReference('bar-tag', $tag2);
|
||||
|
||||
$tag3 = new Tag();
|
||||
$tag3->setLabel('baz');
|
||||
|
||||
$manager->persist($tag3);
|
||||
|
||||
$this->addReference('baz-tag', $tag3);
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user