aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2017-03-28 14:07:42 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2017-03-28 14:07:42 +0200
commit7d1d961267c129e2110ce9cc14c5a9d0a7d255cb (patch)
treed260d7b4ffc8466d7d410ec61bd896bdadd8456e /tests
parente1cc8fd79921fdff9999087ba896c88b14ffc0cd (diff)
parent6ae579e43f6a4ffe607a6361191366410d19f806 (diff)
downloadwallabag-7d1d961267c129e2110ce9cc14c5a9d0a7d255cb.tar.gz
wallabag-7d1d961267c129e2110ce9cc14c5a9d0a7d255cb.tar.zst
wallabag-7d1d961267c129e2110ce9cc14c5a9d0a7d255cb.zip
Merge remote-tracking branch 'origin/master' into 2.3
Diffstat (limited to 'tests')
-rw-r--r--tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php24
-rw-r--r--tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php4
-rw-r--r--tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php2
3 files changed, 28 insertions, 2 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
index 06ed2db6..3eb6d47f 100644
--- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
@@ -1093,5 +1093,29 @@ class EntryControllerTest extends WallabagCoreTestCase
1093 $crawler = $client->submit($form, $data); 1093 $crawler = $client->submit($form, $data);
1094 1094
1095 $this->assertCount(0, $crawler->filter('div[class=entry]')); 1095 $this->assertCount(0, $crawler->filter('div[class=entry]'));
1096
1097 // test url search on list of all articles
1098 $crawler = $client->request('GET', '/all/list');
1099
1100 $form = $crawler->filter('form[name=search]')->form();
1101 $data = [
1102 'search_entry[term]' => 'domain', // the search will match an entry with 'domain' in its url
1103 ];
1104
1105 $crawler = $client->submit($form, $data);
1106
1107 $this->assertCount(1, $crawler->filter('div[class=entry]'));
1108
1109 // same as previous test but for case-sensitivity
1110 $crawler = $client->request('GET', '/all/list');
1111
1112 $form = $crawler->filter('form[name=search]')->form();
1113 $data = [
1114 'search_entry[term]' => 'doMain', // the search will match an entry with 'domain' in its url
1115 ];
1116
1117 $crawler = $client->submit($form, $data);
1118
1119 $this->assertCount(1, $crawler->filter('div[class=entry]'));
1096 } 1120 }
1097} 1121}
diff --git a/tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php b/tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php
index 856954a6..a989ec7f 100644
--- a/tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php
+++ b/tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php
@@ -183,7 +183,9 @@ JSON;
183 183
184 $message = new AMQPMessage($body); 184 $message = new AMQPMessage($body);
185 185
186 $consumer->execute($message); 186 $res = $consumer->execute($message);
187
188 $this->assertTrue($res);
187 } 189 }
188 190
189 public function testMessageWithEntryProcessed() 191 public function testMessageWithEntryProcessed()
diff --git a/tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php b/tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php
index 3b92f759..78bd83ba 100644
--- a/tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php
+++ b/tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php
@@ -182,7 +182,7 @@ JSON;
182 182
183 $res = $consumer->manage($body); 183 $res = $consumer->manage($body);
184 184
185 $this->assertFalse($res); 185 $this->assertTrue($res);
186 } 186 }
187 187
188 public function testMessageWithEntryProcessed() 188 public function testMessageWithEntryProcessed()