18ce3bd73SGreg Roach<?php 28ce3bd73SGreg Roach 38ce3bd73SGreg Roach/** 48ce3bd73SGreg Roach * webtrees: online genealogy 5d11be702SGreg Roach * Copyright (C) 2023 webtrees development team 68ce3bd73SGreg Roach * This program is free software: you can redistribute it and/or modify 78ce3bd73SGreg Roach * it under the terms of the GNU General Public License as published by 88ce3bd73SGreg Roach * the Free Software Foundation, either version 3 of the License, or 98ce3bd73SGreg Roach * (at your option) any later version. 108ce3bd73SGreg Roach * This program is distributed in the hope that it will be useful, 118ce3bd73SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 128ce3bd73SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 138ce3bd73SGreg Roach * GNU General Public License for more details. 148ce3bd73SGreg Roach * You should have received a copy of the GNU General Public License 1589f7189bSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>. 168ce3bd73SGreg Roach */ 178ce3bd73SGreg Roach 188ce3bd73SGreg Roachdeclare(strict_types=1); 198ce3bd73SGreg Roach 208ce3bd73SGreg Roachnamespace Fisharebest\Webtrees\Http\RequestHandlers; 218ce3bd73SGreg Roach 228ce3bd73SGreg Roachuse Fig\Http\Message\StatusCodeInterface; 238ce3bd73SGreg Roachuse Fisharebest\Webtrees\Services\MediaFileService; 248ce3bd73SGreg Roachuse Fisharebest\Webtrees\TestCase; 25*202c018bSGreg Roachuse PHPUnit\Framework\Attributes\CoversClass; 268ce3bd73SGreg Roach 27*202c018bSGreg Roach#[CoversClass(UploadMediaAction::class)] 288ce3bd73SGreg Roachclass UploadMediaActionTest extends TestCase 298ce3bd73SGreg Roach{ 30cd94ca66SGreg Roach protected static bool $uses_database = true; 318ce3bd73SGreg Roach 328ce3bd73SGreg Roach public function testResponseIsOK(): void 338ce3bd73SGreg Roach { 348ce3bd73SGreg Roach $media_file_service = new MediaFileService(); 358ce3bd73SGreg Roach $handler = new UploadMediaAction($media_file_service); 368ce3bd73SGreg Roach $request = self::createRequest(); 378ce3bd73SGreg Roach $response = $handler->handle($request); 388ce3bd73SGreg Roach 398ce3bd73SGreg Roach self::assertSame(StatusCodeInterface::STATUS_FOUND, $response->getStatusCode()); 408ce3bd73SGreg Roach } 418ce3bd73SGreg Roach} 42