From: Nicolas LÅ“uillet Date: Sat, 29 Oct 2016 12:03:55 +0000 (+0200) Subject: Added test for export by filtering with tag X-Git-Tag: 2.1.3~14^2 X-Git-Url: https://git.immae.eu/?p=github%2Fwallabag%2Fwallabag.git;a=commitdiff_plain;h=794ac861cbd0a050915126a1fad6e1e5e5de2083 Added test for export by filtering with tag --- diff --git a/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php index 9ecd8bc4..5ca886bd 100644 --- a/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php @@ -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()