aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-04-24 20:46:25 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-04-24 20:46:25 +0200
commitd6a9e139dc53eee6a5afdbad7f66829e8c78b0d8 (patch)
tree942925063f1a5d08dfd187ce9369a65a86c313c9
parentd8f8a5901086f243f9fa215d52baea6833e1cb55 (diff)
downloadwallabag-d6a9e139dc53eee6a5afdbad7f66829e8c78b0d8.tar.gz
wallabag-d6a9e139dc53eee6a5afdbad7f66829e8c78b0d8.tar.zst
wallabag-d6a9e139dc53eee6a5afdbad7f66829e8c78b0d8.zip
Fix tests
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php4
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
index 5c2216cf..cd4d3490 100644
--- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
@@ -38,6 +38,10 @@ class EntryFilterType extends AbstractType
38 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { 38 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
39 $value = $values['value']; 39 $value = $values['value'];
40 40
41 if (null === $value['left_number'][0] || null === $value['right_number'][0]) {
42 return;
43 }
44
41 $min = (int) ($value['left_number'][0] * $this->user->getConfig()->getReadingSpeed()); 45 $min = (int) ($value['left_number'][0] * $this->user->getConfig()->getReadingSpeed());
42 $max = (int) ($value['right_number'][0] * $this->user->getConfig()->getReadingSpeed()); 46 $max = (int) ($value['right_number'][0] * $this->user->getConfig()->getReadingSpeed());
43 47
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
index 64ebd631..df4c34cd 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
@@ -462,8 +462,8 @@ class EntryControllerTest extends WallabagCoreTestCase
462 $form = $crawler->filter('button[id=submit-filter]')->form(); 462 $form = $crawler->filter('button[id=submit-filter]')->form();
463 463
464 $data = [ 464 $data = [
465 'entry_filter[readingTime][right_number]' => 11, 465 'entry_filter[readingTime][right_number]' => 22,
466 'entry_filter[readingTime][left_number]' => 11, 466 'entry_filter[readingTime][left_number]' => 22,
467 ]; 467 ];
468 468
469 $crawler = $client->submit($form, $data); 469 $crawler = $client->submit($form, $data);