diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php index a0966285..77b57884 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php | |||
@@ -209,7 +209,7 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
209 | $content = $client->getContainer() | 209 | $content = $client->getContainer() |
210 | ->get('doctrine.orm.entity_manager') | 210 | ->get('doctrine.orm.entity_manager') |
211 | ->getRepository('WallabagCoreBundle:Entry') | 211 | ->getRepository('WallabagCoreBundle:Entry') |
212 | ->findOneById(1); | 212 | ->findOneByIsStarred(false); |
213 | 213 | ||
214 | $client->request('GET', '/delete/'.$content->getId()); | 214 | $client->request('GET', '/delete/'.$content->getId()); |
215 | 215 | ||
@@ -360,13 +360,26 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
360 | $form['entry_filter[isStarred]']->untick(); | 360 | $form['entry_filter[isStarred]']->untick(); |
361 | 361 | ||
362 | $crawler = $client->submit($form); | 362 | $crawler = $client->submit($form); |
363 | $this->assertCount(1, $crawler->filter('div[class=entry]')); | 363 | $this->assertCount(2, $crawler->filter('div[class=entry]')); |
364 | 364 | ||
365 | $form = $crawler->filter('button[id=submit-filter]')->form(); | 365 | $form = $crawler->filter('button[id=submit-filter]')->form(); |
366 | $form['entry_filter[isArchived]']->untick(); | 366 | $form['entry_filter[isArchived]']->untick(); |
367 | $form['entry_filter[isStarred]']->tick(); | 367 | $form['entry_filter[isStarred]']->tick(); |
368 | 368 | ||
369 | $crawler = $client->submit($form); | 369 | $crawler = $client->submit($form); |
370 | $this->assertCount(2, $crawler->filter('div[class=entry]')); | ||
371 | } | ||
372 | |||
373 | public function testPreviewPictureFilter() | ||
374 | { | ||
375 | $this->logInAs('admin'); | ||
376 | $client = $this->getClient(); | ||
377 | |||
378 | $crawler = $client->request('GET', '/unread/list'); | ||
379 | $form = $crawler->filter('button[id=submit-filter]')->form(); | ||
380 | $form['entry_filter[previewPicture]']->tick(); | ||
381 | |||
382 | $crawler = $client->submit($form); | ||
370 | $this->assertCount(1, $crawler->filter('div[class=entry]')); | 383 | $this->assertCount(1, $crawler->filter('div[class=entry]')); |
371 | } | 384 | } |
372 | } | 385 | } |