]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Added test for export by filtering with tag 2506/head
authorNicolas Lœuillet <nicolas@loeuillet.org>
Sat, 29 Oct 2016 12:03:55 +0000 (14:03 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Sat, 29 Oct 2016 12:03:55 +0000 (14:03 +0200)
tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php

index 9ecd8bc4e62ddd950aa831c0c5cf1ffaa70c3b16..5ca886bd4d9e0a61ba29c12c76aac8ee80e948df 100644 (file)
@@ -117,6 +117,17 @@ class ExportControllerTest extends WallabagCoreTestCase
         $this->assertEquals('application/pdf', $headers->get('content-type'));
         $this->assertEquals('attachment; filename="All articles.pdf"', $headers->get('content-disposition'));
         $this->assertEquals('binary', $headers->get('content-transfer-encoding'));
+
+        ob_start();
+        $crawler = $client->request('GET', '/export/tag_entries.pdf?tag=foo');
+        ob_end_clean();
+
+        $this->assertEquals(200, $client->getResponse()->getStatusCode());
+
+        $headers = $client->getResponse()->headers;
+        $this->assertEquals('application/pdf', $headers->get('content-type'));
+        $this->assertEquals('attachment; filename="Tag_entries articles.pdf"', $headers->get('content-disposition'));
+        $this->assertEquals('binary', $headers->get('content-transfer-encoding'));
     }
 
     public function testTxtExport()