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.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
index 9f585d85..96f402b0 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
@@ -180,6 +180,38 @@ class EntryControllerTest extends WallabagCoreTestCase
180 $this->assertContains($content->getTitle(), $client->getResponse()->getContent()); 180 $this->assertContains($content->getTitle(), $client->getResponse()->getContent());
181 } 181 }
182 182
183 /**
184 * @depends testPostNewOk
185 *
186 * This test will require an internet connection.
187 */
188 public function testReload()
189 {
190 $this->logInAs('admin');
191 $client = $this->getClient();
192
193 $content = $client->getContainer()
194 ->get('doctrine.orm.entity_manager')
195 ->getRepository('WallabagCoreBundle:Entry')
196 ->findOneByUrl($this->url);
197
198 // empty content
199 $content->setContent('');
200 $client->getContainer()->get('doctrine.orm.entity_manager')->persist($content);
201 $client->getContainer()->get('doctrine.orm.entity_manager')->flush();
202
203 $client->request('GET', '/reload/'.$content->getId());
204
205 $this->assertEquals(302, $client->getResponse()->getStatusCode());
206
207 $content = $client->getContainer()
208 ->get('doctrine.orm.entity_manager')
209 ->getRepository('WallabagCoreBundle:Entry')
210 ->findOneByUrl($this->url);
211
212 $this->assertNotEmpty($content->getContent());
213 }
214
183 public function testEdit() 215 public function testEdit()
184 { 216 {
185 $this->logInAs('admin'); 217 $this->logInAs('admin');