summaryrefslogtreecommitdiff
path: root/tests/app/Http/RequestHandlers/ImportThumbnailsActionTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/app/Http/RequestHandlers/ImportThumbnailsActionTest.php')
-rw-r--r--tests/app/Http/RequestHandlers/ImportThumbnailsActionTest.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/app/Http/RequestHandlers/ImportThumbnailsActionTest.php b/tests/app/Http/RequestHandlers/ImportThumbnailsActionTest.php
new file mode 100644
index 0000000000..666830fec1
--- /dev/null
+++ b/tests/app/Http/RequestHandlers/ImportThumbnailsActionTest.php
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * webtrees: online genealogy
+ * Copyright (C) 2021 webtrees development team
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+declare(strict_types=1);
+
+namespace Fisharebest\Webtrees\Http\RequestHandlers;
+
+use Fig\Http\Message\StatusCodeInterface;
+use Fisharebest\Webtrees\Services\PendingChangesService;
+use Fisharebest\Webtrees\Services\SearchService;
+use Fisharebest\Webtrees\Services\TreeService;
+use Fisharebest\Webtrees\TestCase;
+
+/**
+ * Test ImportThumbnailsAction class.
+ *
+ * @covers \Fisharebest\Webtrees\Http\RequestHandlers\ImportThumbnailsAction
+ */
+class ImportThumbnailsActionTest extends TestCase
+{
+ protected static $uses_database = true;
+
+ /**
+ * @return void
+ */
+ public function testWebtrees1ThumbnailsAction(): void
+ {
+ $tree_service = new TreeService();
+ $pending_changes_service = new PendingChangesService();
+ $handler = new ImportThumbnailsAction($pending_changes_service, $tree_service);
+ $request = self::createRequest()
+ ->withParsedBody(['thumbnail' => 'foo', 'action' => '', 'xref' => [], 'ged' => []]);
+ $response = $handler->handle($request);
+
+ self::assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode());
+ }
+}