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 28*202c018bSGreg Roach#[CoversClass(ManageMediaPage::class)] 298ce3bd73SGreg Roachclass ManageMediaPageTest extends TestCase 308ce3bd73SGreg Roach{ 31cd94ca66SGreg Roach protected static bool $uses_database = true; 325062b1caSJonathan Jaubart 338ce3bd73SGreg Roach public function testIndex(): void 348ce3bd73SGreg Roach { 358ce3bd73SGreg Roach $media_file_service = new MediaFileService(); 368ce3bd73SGreg Roach $handler = new ManageMediaPage($media_file_service); 378ce3bd73SGreg Roach $request = self::createRequest(); 388ce3bd73SGreg Roach $response = $handler->handle($request); 398ce3bd73SGreg Roach 408ce3bd73SGreg Roach self::assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode()); 418ce3bd73SGreg Roach } 428ce3bd73SGreg Roach} 43