18ce3bd73SGreg Roach<?php 28ce3bd73SGreg Roach 38ce3bd73SGreg Roach/** 48ce3bd73SGreg Roach * webtrees: online genealogy 5*d11be702SGreg 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; 258ce3bd73SGreg Roach 268ce3bd73SGreg Roach/** 278ce3bd73SGreg Roach * Test MediaController class. 288ce3bd73SGreg Roach * 298ce3bd73SGreg Roach * @covers \Fisharebest\Webtrees\Http\RequestHandlers\UploadMediaPage 308ce3bd73SGreg Roach */ 318ce3bd73SGreg Roachclass UploadMediaPageTest extends TestCase 328ce3bd73SGreg Roach{ 33cd94ca66SGreg Roach protected static bool $uses_database = true; 348ce3bd73SGreg Roach 358ce3bd73SGreg Roach /** 368ce3bd73SGreg Roach * @return void 378ce3bd73SGreg Roach */ 388ce3bd73SGreg Roach public function testResponseIsOK(): void 398ce3bd73SGreg Roach { 408ce3bd73SGreg Roach $media_file_service = new MediaFileService(); 418ce3bd73SGreg Roach $handler = new UploadMediaPage($media_file_service); 428ce3bd73SGreg Roach $request = self::createRequest(); 438ce3bd73SGreg Roach $response = $handler->handle($request); 448ce3bd73SGreg Roach 458ce3bd73SGreg Roach self::assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode()); 468ce3bd73SGreg Roach } 478ce3bd73SGreg Roach} 48