aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/Thumb/EpubthumbTest.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-11-08 14:41:52 +0100
committerHarald Eilertsen <haraldei@anduin.net>2024-11-08 16:48:23 +0100
commit0534fe68869aae231259ee48a38b4533f3f1ff99 (patch)
tree079f392c56da36f5c4fd6b7a011aeab0d037864f /tests/unit/Thumb/EpubthumbTest.php
parent6e51571309481b64edd40c0571b83bc7a1562b4f (diff)
downloadvolse-hubzilla-0534fe68869aae231259ee48a38b4533f3f1ff99.tar.gz
volse-hubzilla-0534fe68869aae231259ee48a38b4533f3f1ff99.tar.bz2
volse-hubzilla-0534fe68869aae231259ee48a38b4533f3f1ff99.zip
Thumbs\Epubthumb: Adapt to new version of EPub meta lib.
Also fixes a few issues and refactor the code a bit.
Diffstat (limited to 'tests/unit/Thumb/EpubthumbTest.php')
-rw-r--r--tests/unit/Thumb/EpubthumbTest.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/unit/Thumb/EpubthumbTest.php b/tests/unit/Thumb/EpubthumbTest.php
new file mode 100644
index 000000000..5dabaf359
--- /dev/null
+++ b/tests/unit/Thumb/EpubthumbTest.php
@@ -0,0 +1,21 @@
+<?php
+/*
+ * SPDX-FileCopyrightText: 2024 Hubzilla Community
+ * SPDX-FileContributor: Harald Eilertsen
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+namespace Zotlabs\Tests\Unit\Thumbs;
+
+use Zotlabs\Thumbs\Epubthumb;
+use Zotlabs\Tests\Unit\UnitTestCase;
+
+class EpubthumbTest extends UnitTestCase {
+ function testEpubThumbMatch(): void {
+ $thumbnailer = new Epubthumb();
+
+ $this->assertTrue($thumbnailer->Match('application/epub+zip'));
+ $this->assertFalse($thumbnailer->Match('application/zip'));
+ }
+}