. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Http\RequestHandlers; use Fig\Http\Message\StatusCodeInterface; use Fisharebest\Webtrees\Services\MapDataService; use Fisharebest\Webtrees\TestCase; use PHPUnit\Framework\Attributes\CoversClass; #[CoversClass(MapDataExportCSV::class)] class MapDataExportCSVTest extends TestCase { protected static bool $uses_database = true; public function testExportCSV(): void { $map_data_service = new MapDataService(); $handler = new MapDataExportCSV($map_data_service); $request = self::createRequest(); $response = $handler->handle($request); self::assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode()); self::assertSame($response->getHeaderLine('content-type'), 'text/csv; charset=UTF-8'); } }