diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-04-26 13:40:58 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-04-26 13:40:58 +0200 |
commit | 68a90821a305867e9b655da2dbfe558d37253990 (patch) | |
tree | 5d87be5998bedfc2e25099be17fdc1f3e5cc45ed /tests/Wallabag | |
parent | f277bc042c8e805aab14b31b5b51e2878d80c6f4 (diff) | |
download | wallabag-68a90821a305867e9b655da2dbfe558d37253990.tar.gz wallabag-68a90821a305867e9b655da2dbfe558d37253990.tar.zst wallabag-68a90821a305867e9b655da2dbfe558d37253990.zip |
Handle redirection from previous feeds
Diffstat (limited to 'tests/Wallabag')
-rw-r--r-- | tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php b/tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php index 70f33ebe..d52d7bb8 100644 --- a/tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php | |||
@@ -225,4 +225,37 @@ class FeedControllerTest extends WallabagCoreTestCase | |||
225 | $client->request('GET', '/feed/admin/SUPERTOKEN/tags/foo/3000'); | 225 | $client->request('GET', '/feed/admin/SUPERTOKEN/tags/foo/3000'); |
226 | $this->assertSame(302, $client->getResponse()->getStatusCode()); | 226 | $this->assertSame(302, $client->getResponse()->getStatusCode()); |
227 | } | 227 | } |
228 | |||
229 | public function dataForRedirect() | ||
230 | { | ||
231 | return [ | ||
232 | [ | ||
233 | '/admin/YZIOAUZIAO/unread.xml', | ||
234 | ], | ||
235 | [ | ||
236 | '/admin/YZIOAUZIAO/starred.xml', | ||
237 | ], | ||
238 | [ | ||
239 | '/admin/YZIOAUZIAO/archive.xml', | ||
240 | ], | ||
241 | [ | ||
242 | '/admin/YZIOAUZIAO/all.xml', | ||
243 | ], | ||
244 | [ | ||
245 | '/admin/YZIOAUZIAO/tags/foo.xml', | ||
246 | ], | ||
247 | ]; | ||
248 | } | ||
249 | |||
250 | /** | ||
251 | * @dataProvider dataForRedirect | ||
252 | */ | ||
253 | public function testRedirectFromRssToAtom($url) | ||
254 | { | ||
255 | $client = $this->getClient(); | ||
256 | |||
257 | $client->request('GET', $url); | ||
258 | |||
259 | $this->assertSame(301, $client->getResponse()->getStatusCode()); | ||
260 | } | ||
228 | } | 261 | } |