. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Http\RequestHandlers; use Fig\Http\Message\RequestMethodInterface; use Fig\Http\Message\StatusCodeInterface; use Fisharebest\Webtrees\TestCase; use function dirname; /** * Test the location import. * * @covers \Fisharebest\Webtrees\Http\RequestHandlers\MapDataImportAction */ class MapDataImportActionTest extends TestCase { protected static bool $uses_database = true; /** * @return void */ public function testImportAction(): void { $csv = $this->createUploadedFile(dirname(__DIR__, 3) . '/data/places.csv', 'text/csv'); $handler = new MapDataImportAction(); $request = self::createRequest(RequestMethodInterface::METHOD_POST, [], [], ['serverfile' => $csv]); $response = $handler->handle($request); self::assertSame(StatusCodeInterface::STATUS_FOUND, $response->getStatusCode()); } }