Fix tests

This commit is contained in:
Nicolas Lœuillet 2016-04-24 20:46:25 +02:00
parent d8f8a59010
commit d6a9e139dc
No known key found for this signature in database
GPG Key ID: 5656BE27E1E34D0A
2 changed files with 6 additions and 2 deletions

View File

@ -38,6 +38,10 @@ class EntryFilterType extends AbstractType
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
$value = $values['value'];
if (null === $value['left_number'][0] || null === $value['right_number'][0]) {
return;
}
$min = (int) ($value['left_number'][0] * $this->user->getConfig()->getReadingSpeed());
$max = (int) ($value['right_number'][0] * $this->user->getConfig()->getReadingSpeed());

View File

@ -462,8 +462,8 @@ class EntryControllerTest extends WallabagCoreTestCase
$form = $crawler->filter('button[id=submit-filter]')->form();
$data = [
'entry_filter[readingTime][right_number]' => 11,
'entry_filter[readingTime][left_number]' => 11,
'entry_filter[readingTime][right_number]' => 22,
'entry_filter[readingTime][left_number]' => 22,
];
$crawler = $client->submit($form, $data);