Add tests for export endpoints

This commit is contained in:
Constantin Graf
2024-10-29 14:02:16 +01:00
committed by Constantin Graf
parent 5a1e05374c
commit 9a60e2b911
14 changed files with 675 additions and 88 deletions

View File

@@ -4,6 +4,16 @@ declare(strict_types=1);
namespace Tests\Unit\Endpoint\Api\V1;
use Illuminate\Testing\TestResponse;
use Tests\TestCaseWithDatabase;
class ApiEndpointTestAbstract extends TestCaseWithDatabase {}
class ApiEndpointTestAbstract extends TestCaseWithDatabase
{
protected function assertResponseCode(TestResponse $response, int $statusCode): void
{
if ($response->getStatusCode() !== $statusCode) {
dump($response->getContent());
}
$response->assertStatus($statusCode);
}
}