diff options
author | Mario Vavti <mario@mariovavti.com> | 2024-11-09 11:27:53 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2024-11-09 11:27:53 +0100 |
commit | 954d92c354aef93cac7079472c55b53ac4a07d2a (patch) | |
tree | 9ece7278658a82e7f21e71a8cdc7cc13f5d91aed /tests | |
parent | 8dbebc2b426ac3a27d2476acb6ccc2f353f4212a (diff) | |
parent | 14207c68ca451c365b3fe1f8d267409da39f9498 (diff) | |
download | volse-hubzilla-954d92c354aef93cac7079472c55b53ac4a07d2a.tar.gz volse-hubzilla-954d92c354aef93cac7079472c55b53ac4a07d2a.tar.bz2 volse-hubzilla-954d92c354aef93cac7079472c55b53ac4a07d2a.zip |
Merge branch 'dev' into containers
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/Module/AdminAccountEditTest.php | 9 | ||||
-rw-r--r-- | tests/unit/Module/TestCase.php | 3 | ||||
-rw-r--r-- | tests/unit/Thumb/EpubthumbTest.php | 21 |
3 files changed, 33 insertions, 0 deletions
diff --git a/tests/unit/Module/AdminAccountEditTest.php b/tests/unit/Module/AdminAccountEditTest.php index dab646a45..fe682c527 100644 --- a/tests/unit/Module/AdminAccountEditTest.php +++ b/tests/unit/Module/AdminAccountEditTest.php @@ -15,6 +15,15 @@ use Zotlabs\Model\Account; class AdminAccountEditTest extends TestCase { + private $stub_is_site_admin; + private $stub_info; + private $stub_notice; + private $stub_check_security; + private $stub_get_form_security_token; + + private array $info; + private array $notice; + #[Before] public function setup_mocks(): void { /* diff --git a/tests/unit/Module/TestCase.php b/tests/unit/Module/TestCase.php index 81d8e61fc..1a4cf52fc 100644 --- a/tests/unit/Module/TestCase.php +++ b/tests/unit/Module/TestCase.php @@ -26,6 +26,9 @@ class TestCase extends UnitTestCase { // Import PHPMock methods into this class use \phpmock\phpunit\PHPMock; + protected $killme_stub; + protected $goaway_stub; + #[After] public function cleanup_stubs(): void { $this->killme_stub = null; 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')); + } +} |