This commit is contained in:
Yangxt
2026-09-30 11:11:54 +08:00
parent cb9b7a4bd4
commit 2fb57ec490
160 changed files with 14764 additions and 53 deletions
+35
View File
@@ -0,0 +1,35 @@
<?php
declare(strict_types=1);
namespace Tests\Feature;
use Tests\TestCase;
class HealthTest extends TestCase
{
public function test_health_returns_the_standard_envelope(): void
{
$response = $this->getJson('/api/v1/health');
$response->assertOk()
->assertExactJson([
'success' => true,
'message' => 'OK',
'data' => [
'status' => 'ok',
],
]);
$response->assertHeader('X-Request-Id');
}
public function test_health_keeps_a_valid_request_id(): void
{
$response = $this->withHeader('X-Request-Id', 'req_123')
->getJson('/api/v1/health');
$response->assertOk();
$response->assertHeader('X-Request-Id', 'req_123');
}
}