aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller/TagController.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-04-30 15:03:22 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-08-23 07:26:18 +0200
commit267e8d6361f8e7791a8687f2370a3e9d08af6648 (patch)
tree33ba4fb5e781271542bc9f7430be4d1240179f68 /src/Wallabag/CoreBundle/Controller/TagController.php
parent371bcca0f6b18951a15e56daae5bca2558c01851 (diff)
downloadwallabag-267e8d6361f8e7791a8687f2370a3e9d08af6648.tar.gz
wallabag-267e8d6361f8e7791a8687f2370a3e9d08af6648.tar.zst
wallabag-267e8d6361f8e7791a8687f2370a3e9d08af6648.zip
Add tests for tag list routes
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/TagController.php')
-rw-r--r--src/Wallabag/CoreBundle/Controller/TagController.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php
index b6514ea6..1cbc413d 100644
--- a/src/Wallabag/CoreBundle/Controller/TagController.php
+++ b/src/Wallabag/CoreBundle/Controller/TagController.php
@@ -105,7 +105,11 @@ class TagController extends Controller
105 */ 105 */
106 public function showEntriesForTagAction(Tag $tag, $page, Request $request) 106 public function showEntriesForTagAction(Tag $tag, $page, Request $request)
107 { 107 {
108 $pagerAdapter = new ArrayAdapter($tag->getEntries()->toArray()); 108 $entriesByTag = $this->getDoctrine()
109 ->getRepository('WallabagCoreBundle:Entry')
110 ->findAllByTagId($this->getUser()->getId(), $tag->getId());
111
112 $pagerAdapter = new ArrayAdapter($entriesByTag);
109 113
110 $entries = $this->get('wallabag_core.helper.prepare_pager_for_entries') 114 $entries = $this->get('wallabag_core.helper.prepare_pager_for_entries')
111 ->prepare($pagerAdapter, $page); 115 ->prepare($pagerAdapter, $page);