aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-06-23 10:46:47 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-06-23 10:46:47 +0200
commit95859e54c512ec4a3ee1c28404981f5c4b9481df (patch)
treea3bacfa304746d3267baa92e171755400f3cd05d /tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
parent2c00dddf01e4c94e856d7c9e9e2e85b2de8dceec (diff)
downloadwallabag-95859e54c512ec4a3ee1c28404981f5c4b9481df.tar.gz
wallabag-95859e54c512ec4a3ee1c28404981f5c4b9481df.tar.zst
wallabag-95859e54c512ec4a3ee1c28404981f5c4b9481df.zip
Add some tests about readingTime
Diffstat (limited to 'tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php')
-rw-r--r--tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
index bea771bc..5c739c78 100644
--- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
@@ -499,6 +499,42 @@ class EntryControllerTest extends WallabagCoreTestCase
499 $this->assertCount(1, $crawler->filter('div[class=entry]')); 499 $this->assertCount(1, $crawler->filter('div[class=entry]'));
500 } 500 }
501 501
502 public function testFilterOnReadingTimeOnlyUpper()
503 {
504 $this->logInAs('admin');
505 $client = $this->getClient();
506
507 $crawler = $client->request('GET', '/unread/list');
508
509 $form = $crawler->filter('button[id=submit-filter]')->form();
510
511 $data = [
512 'entry_filter[readingTime][right_number]' => 22,
513 ];
514
515 $crawler = $client->submit($form, $data);
516
517 $this->assertCount(2, $crawler->filter('div[class=entry]'));
518 }
519
520 public function testFilterOnReadingTimeOnlyLower()
521 {
522 $this->logInAs('admin');
523 $client = $this->getClient();
524
525 $crawler = $client->request('GET', '/unread/list');
526
527 $form = $crawler->filter('button[id=submit-filter]')->form();
528
529 $data = [
530 'entry_filter[readingTime][left_number]' => 22,
531 ];
532
533 $crawler = $client->submit($form, $data);
534
535 $this->assertCount(4, $crawler->filter('div[class=entry]'));
536 }
537
502 public function testFilterOnUnreadStatus() 538 public function testFilterOnUnreadStatus()
503 { 539 {
504 $this->logInAs('admin'); 540 $this->logInAs('admin');