mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
Remove remaining MOBI stuff
This commit is contained in:
parent
bdb297f2b4
commit
c6ff0bc691
6 changed files with 6 additions and 132 deletions
|
@ -75,13 +75,6 @@ class EntryRestControllerTest extends WallabagApiTestCase
|
|||
$this->assertStringContainsString('application/epub', $this->client->getResponse()->getContent());
|
||||
$this->assertSame('application/epub+zip', $this->client->getResponse()->headers->get('Content-Type'));
|
||||
|
||||
// re-auth client for mobi
|
||||
$client = $this->createAuthorizedClient();
|
||||
$client->request('GET', '/api/entries/' . $entry->getId() . '/export.mobi');
|
||||
$this->assertSame(200, $client->getResponse()->getStatusCode());
|
||||
|
||||
$this->assertSame('application/x-mobipocket-ebook', $client->getResponse()->headers->get('Content-Type'));
|
||||
|
||||
// re-auth client for pdf
|
||||
$client = $this->createAuthorizedClient();
|
||||
$client->request('GET', '/api/entries/' . $entry->getId() . '/export.pdf');
|
||||
|
|
|
@ -65,7 +65,7 @@ class ExportControllerTest extends WallabagCoreTestCase
|
|||
$this->logInAs('admin');
|
||||
$client = $this->getTestClient();
|
||||
|
||||
$client->request('GET', '/export/0.mobi');
|
||||
$client->request('GET', '/export/0.pdf');
|
||||
|
||||
$this->assertSame(404, $client->getResponse()->getStatusCode());
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ class ExportControllerTest extends WallabagCoreTestCase
|
|||
->getRepository(Entry::class)
|
||||
->findOneByUsernameAndNotArchived('bob');
|
||||
|
||||
$client->request('GET', '/export/' . $content->getId() . '.mobi');
|
||||
$client->request('GET', '/export/' . $content->getId() . '.pdf');
|
||||
|
||||
$this->assertSame(404, $client->getResponse()->getStatusCode());
|
||||
}
|
||||
|
@ -102,28 +102,6 @@ class ExportControllerTest extends WallabagCoreTestCase
|
|||
$this->assertSame('binary', $headers->get('content-transfer-encoding'));
|
||||
}
|
||||
|
||||
public function testMobiExport()
|
||||
{
|
||||
$this->logInAs('admin');
|
||||
$client = $this->getTestClient();
|
||||
|
||||
$content = $client->getContainer()
|
||||
->get(EntityManagerInterface::class)
|
||||
->getRepository(Entry::class)
|
||||
->findOneByUsernameAndNotArchived('admin');
|
||||
|
||||
ob_start();
|
||||
$crawler = $client->request('GET', '/export/' . $content->getId() . '.mobi');
|
||||
ob_end_clean();
|
||||
|
||||
$this->assertSame(200, $client->getResponse()->getStatusCode());
|
||||
|
||||
$headers = $client->getResponse()->headers;
|
||||
$this->assertSame('application/x-mobipocket-ebook', $headers->get('content-type'));
|
||||
$this->assertSame('attachment; filename="' . $this->getSanitizedFilename($content->getTitle()) . '.mobi"', $headers->get('content-disposition'));
|
||||
$this->assertSame('binary', $headers->get('content-transfer-encoding'));
|
||||
}
|
||||
|
||||
public function testPdfExport()
|
||||
{
|
||||
$this->logInAs('admin');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue