$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-bar');
+ 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()
$contentInDB = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
- ->findOneByUsernameAndNotArchived('admin');
+ ->findByUrlAndUserId('http://0.0.0.0/entry1', $this->getLoggedInUserId());
ob_start();
$crawler = $client->request('GET', '/export/'.$contentInDB->getId().'.json');
$this->assertEquals($contentInDB->getLanguage(), $content[0]['language']);
$this->assertEquals($contentInDB->getReadingtime(), $content[0]['reading_time']);
$this->assertEquals($contentInDB->getDomainname(), $content[0]['domain_name']);
- $this->assertEquals(['foo', 'baz'], $content[0]['tags']);
+ $this->assertEquals(['foo bar', 'baz'], $content[0]['tags']);
}
public function testXmlExport()