]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
Fix #1551 - Redirect to the last page when current page is out of range
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Tests / Controller / EntryControllerTest.php
index 32d6a57537e253088ff6feb31badfaab8e29eea1..5512d6e1bd08f80860578226efa57d6c541bc412 100644 (file)
@@ -216,6 +216,17 @@ class EntryControllerTest extends WallabagCoreTestCase
         $this->assertEquals(200, $client->getResponse()->getStatusCode());
     }
 
+    public function testRangeException()
+    {
+        $this->logInAs('admin');
+        $client = $this->getClient();
+
+        $client->request('GET', '/all/list/900');
+
+        $this->assertEquals(302, $client->getResponse()->getStatusCode());
+        $this->assertEquals('/all/list', $client->getResponse()->getTargetUrl());
+    }
+
     /**
      * @depends testPostNewOk
      */