aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Tests/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Tests/Controller')
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php26
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php6
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/TagControllerTest.php2
3 files changed, 13 insertions, 21 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
index 5ab9c329..116eec60 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
@@ -192,14 +192,14 @@ class ConfigControllerTest extends WallabagCoreTestCase
192 'update_user[name]' => '', 192 'update_user[name]' => '',
193 'update_user[email]' => '', 193 'update_user[email]' => '',
194 ), 194 ),
195 'This value should not be blank.', 195 'Please enter an email',
196 ), 196 ),
197 array( 197 array(
198 array( 198 array(
199 'update_user[name]' => '', 199 'update_user[name]' => '',
200 'update_user[email]' => 'test', 200 'update_user[email]' => 'test',
201 ), 201 ),
202 'This value is not a valid email address.', 202 'The email is not valid',
203 ), 203 ),
204 ); 204 );
205 } 205 }
@@ -261,31 +261,23 @@ class ConfigControllerTest extends WallabagCoreTestCase
261 'new_user[password]' => '', 261 'new_user[password]' => '',
262 'new_user[email]' => '', 262 'new_user[email]' => '',
263 ), 263 ),
264 'This value should not be blank.', 264 'Please enter a username',
265 ), 265 ),
266 array( 266 array(
267 array( 267 array(
268 'new_user[username]' => 'ad', 268 'new_user[username]' => 'a',
269 'new_user[password]' => '', 269 'new_user[password]' => 'mypassword',
270 'new_user[email]' => '', 270 'new_user[email]' => '',
271 ), 271 ),
272 'This value is too short.', 272 'The username is too short',
273 ), 273 ),
274 array( 274 array(
275 array( 275 array(
276 'new_user[username]' => 'wallace', 276 'new_user[username]' => 'wallace',
277 'new_user[password]' => '', 277 'new_user[password]' => 'mypassword',
278 'new_user[email]' => 'test', 278 'new_user[email]' => 'test',
279 ), 279 ),
280 'This value is not a valid email address.', 280 'The email is not valid',
281 ),
282 array(
283 array(
284 'new_user[username]' => 'wallace',
285 'new_user[password]' => 'admin',
286 'new_user[email]' => 'wallace@wallace.me',
287 ),
288 'Password should by at least',
289 ), 281 ),
290 array( 282 array(
291 array( 283 array(
@@ -293,7 +285,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
293 'new_user[password]' => 'wallacewallace', 285 'new_user[password]' => 'wallacewallace',
294 'new_user[email]' => 'wallace@wallace.me', 286 'new_user[email]' => 'wallace@wallace.me',
295 ), 287 ),
296 'This value is already used', 288 'The username is already used',
297 ), 289 ),
298 ); 290 );
299 } 291 }
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
index 5798009c..77b57884 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
@@ -209,7 +209,7 @@ class EntryControllerTest extends WallabagCoreTestCase
209 $content = $client->getContainer() 209 $content = $client->getContainer()
210 ->get('doctrine.orm.entity_manager') 210 ->get('doctrine.orm.entity_manager')
211 ->getRepository('WallabagCoreBundle:Entry') 211 ->getRepository('WallabagCoreBundle:Entry')
212 ->findOneById(1); 212 ->findOneByIsStarred(false);
213 213
214 $client->request('GET', '/delete/'.$content->getId()); 214 $client->request('GET', '/delete/'.$content->getId());
215 215
@@ -360,14 +360,14 @@ class EntryControllerTest extends WallabagCoreTestCase
360 $form['entry_filter[isStarred]']->untick(); 360 $form['entry_filter[isStarred]']->untick();
361 361
362 $crawler = $client->submit($form); 362 $crawler = $client->submit($form);
363 $this->assertCount(1, $crawler->filter('div[class=entry]')); 363 $this->assertCount(2, $crawler->filter('div[class=entry]'));
364 364
365 $form = $crawler->filter('button[id=submit-filter]')->form(); 365 $form = $crawler->filter('button[id=submit-filter]')->form();
366 $form['entry_filter[isArchived]']->untick(); 366 $form['entry_filter[isArchived]']->untick();
367 $form['entry_filter[isStarred]']->tick(); 367 $form['entry_filter[isStarred]']->tick();
368 368
369 $crawler = $client->submit($form); 369 $crawler = $client->submit($form);
370 $this->assertCount(1, $crawler->filter('div[class=entry]')); 370 $this->assertCount(2, $crawler->filter('div[class=entry]'));
371 } 371 }
372 372
373 public function testPreviewPictureFilter() 373 public function testPreviewPictureFilter()
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/TagControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/TagControllerTest.php
index af39d6ce..d25b2db5 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/TagControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/TagControllerTest.php
@@ -24,7 +24,7 @@ class TagControllerTest extends WallabagCoreTestCase
24 $entry = $client->getContainer() 24 $entry = $client->getContainer()
25 ->get('doctrine.orm.entity_manager') 25 ->get('doctrine.orm.entity_manager')
26 ->getRepository('WallabagCoreBundle:Entry') 26 ->getRepository('WallabagCoreBundle:Entry')
27 ->findOneByIsArchived(false); 27 ->findOneBy(array());
28 28
29 $crawler = $client->request('GET', '/view/'.$entry->getId()); 29 $crawler = $client->request('GET', '/view/'.$entry->getId());
30 30