+ $data = [
+ 'entry_filter[readingTime][right_number]' => -22,
+ 'entry_filter[readingTime][left_number]' => -22,
+ ];
+
+ $crawler = $client->submit($form, $data);
+
+ // forcing negative value results in no entry displayed
+ $this->assertCount(0, $crawler->filter('div[class=entry]'));
+ }
+
+ public function testFilterOnReadingTimeOnlyUpper()
+ {
+ $this->logInAs('admin');
+ $this->useTheme('baggy');
+ $client = $this->getClient();
+
+ $crawler = $client->request('GET', '/all/list');
+ $this->assertCount(5, $crawler->filter('div[class=entry]'));
+
+ $entry = new Entry($this->getLoggedInUser());
+ $entry->setUrl($this->url);
+ $entry->setReadingTime(23);
+ $this->getEntityManager()->persist($entry);
+ $this->getEntityManager()->flush();
+
+ $crawler = $client->request('GET', '/all/list');
+ $this->assertCount(6, $crawler->filter('div[class=entry]'));
+
+ $form = $crawler->filter('button[id=submit-filter]')->form();
+