diff options
Diffstat (limited to 'tests/app/Http/RequestHandlers')
4 files changed, 8 insertions, 6 deletions
diff --git a/tests/app/Http/RequestHandlers/MapDataExportCSVTest.php b/tests/app/Http/RequestHandlers/MapDataExportCSVTest.php index 232afb7445..24b1e52968 100644 --- a/tests/app/Http/RequestHandlers/MapDataExportCSVTest.php +++ b/tests/app/Http/RequestHandlers/MapDataExportCSVTest.php @@ -43,6 +43,6 @@ class MapDataExportCSVTest extends TestCase $response = $handler->handle($request); self::assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode()); - self::assertSame($response->getHeaderLine('Content-Type'), 'text/csv; charset=UTF-8'); + self::assertSame($response->getHeaderLine('content-type'), 'text/csv; charset=UTF-8'); } } diff --git a/tests/app/Http/RequestHandlers/MapDataExportGeoJsonTest.php b/tests/app/Http/RequestHandlers/MapDataExportGeoJsonTest.php index 7d501ac2c3..157e0e9f03 100644 --- a/tests/app/Http/RequestHandlers/MapDataExportGeoJsonTest.php +++ b/tests/app/Http/RequestHandlers/MapDataExportGeoJsonTest.php @@ -43,6 +43,6 @@ class MapDataExportGeoJsonTest extends TestCase $response = $handler->handle($request); self::assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode()); - self::assertSame($response->getHeaderLine('Content-Type'), 'application/vnd.geo+json'); + self::assertSame($response->getHeaderLine('content-type'), 'application/vnd.geo+json'); } } diff --git a/tests/app/Http/RequestHandlers/MapDataImportPageTest.php b/tests/app/Http/RequestHandlers/MapDataImportPageTest.php index f2ef7a9085..ffa32e5763 100644 --- a/tests/app/Http/RequestHandlers/MapDataImportPageTest.php +++ b/tests/app/Http/RequestHandlers/MapDataImportPageTest.php @@ -41,6 +41,6 @@ class MapDataImportPageTest extends TestCase $response = $handler->handle($request); self::assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode()); - self::assertSame($response->getHeaderLine('Content-Type'), 'text/html; charset=UTF-8'); + self::assertSame($response->getHeaderLine('content-type'), 'text/html; charset=UTF-8'); } } diff --git a/tests/app/Http/RequestHandlers/SiteLogsDownloadTest.php b/tests/app/Http/RequestHandlers/SiteLogsDownloadTest.php index 9eadf7280f..44f2167588 100644 --- a/tests/app/Http/RequestHandlers/SiteLogsDownloadTest.php +++ b/tests/app/Http/RequestHandlers/SiteLogsDownloadTest.php @@ -39,8 +39,8 @@ class SiteLogsDownloadTest extends TestCase $query1 = $this->createStub(Builder::class); $query2 = $this->createStub(Builder::class); - $rows1 = $this->createStub(Collection::class); - $rows2 = $this->createStub(Collection::class); + $rows1 = $this->createStub(Collection::class); + $rows2 = $this->createStub(Collection::class); $query1->method('orderBy')->willReturn($query2); $query2->method('get')->willReturn($rows1); $rows1->method('map')->willReturn($rows2); @@ -52,6 +52,8 @@ class SiteLogsDownloadTest extends TestCase $handler = new SiteLogsDownload($site_logs_service); $response = $handler->handle($request); - $this->assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode()); + static::assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode()); + static::assertSame('text/csv; charset=UTF-8', $response->getHeaderLine('content-type')); + static::assertSame('attachment; filename="webtrees-logs.csv"', $response->getHeaderLine('content-disposition')); } } |
