1
0
Fork 0
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:
Jeremy Benoist 2023-08-23 08:44:40 +02:00
parent bdb297f2b4
commit c6ff0bc691
No known key found for this signature in database
GPG key ID: 7168D5DD29F38552
6 changed files with 6 additions and 132 deletions

View file

@ -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');

View file

@ -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');