aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php')
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
index 0fcf323c..46fbaf91 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
@@ -25,10 +25,11 @@ class EntryControllerTest extends WallabagCoreTestCase
25 $client = $this->getClient(); 25 $client = $this->getClient();
26 26
27 $client->request('GET', '/unread/list'); 27 $client->request('GET', '/unread/list');
28 $client->followRedirect(); 28 $crawler = $client->followRedirect();
29 29
30 $this->assertEquals(200, $client->getResponse()->getStatusCode()); 30 $this->assertEquals(200, $client->getResponse()->getStatusCode());
31 $this->assertContains('quickstart.intro.paragraph_1', $client->getResponse()->getContent()); 31 $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
32 $this->assertContains('quickstart.intro.paragraph_1', $body[0]);
32 33
33 // Test if quickstart is disabled when user has 1 entry 34 // Test if quickstart is disabled when user has 1 entry
34 $crawler = $client->request('GET', '/new'); 35 $crawler = $client->request('GET', '/new');
@@ -45,8 +46,9 @@ class EntryControllerTest extends WallabagCoreTestCase
45 $this->assertEquals(302, $client->getResponse()->getStatusCode()); 46 $this->assertEquals(302, $client->getResponse()->getStatusCode());
46 $client->followRedirect(); 47 $client->followRedirect();
47 48
48 $client->request('GET', '/unread/list'); 49 $crawler = $client->request('GET', '/unread/list');
49 $this->assertContains('entry.list.number_on_the_page', $client->getResponse()->getContent()); 50 $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
51 $this->assertContains('entry.list.number_on_the_page', $body[0]);
50 } 52 }
51 53
52 public function testGetNew() 54 public function testGetNew()
@@ -240,10 +242,11 @@ class EntryControllerTest extends WallabagCoreTestCase
240 ->getRepository('WallabagCoreBundle:Entry') 242 ->getRepository('WallabagCoreBundle:Entry')
241 ->findByUrlAndUserId($this->url, $this->getLoggedInUserId()); 243 ->findByUrlAndUserId($this->url, $this->getLoggedInUserId());
242 244
243 $client->request('GET', '/view/'.$content->getId()); 245 $crawler = $client->request('GET', '/view/'.$content->getId());
244 246
245 $this->assertEquals(200, $client->getResponse()->getStatusCode()); 247 $this->assertEquals(200, $client->getResponse()->getStatusCode());
246 $this->assertContains($content->getTitle(), $client->getResponse()->getContent()); 248 $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
249 $this->assertContains($content->getTitle(), $body[0]);
247 } 250 }
248 251
249 /** 252 /**