Files
solidtime/tests/Unit/Endpoint/Web/HealthCheckEndpointTest.php
T
2024-05-19 12:04:25 +02:00

40 lines
867 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Unit\Endpoint\Web;
class HealthCheckEndpointTest extends EndpointTestAbstract
{
public function test_up_endpoint_returns_ok(): void
{
// Act
$response = $this->get('health-check/up');
// Assert
$response->assertSuccessful();
$response->assertExactJson([
'success' => true,
]);
}
public function test_debug_endpoint_returns_ok(): void
{
// Act
$response = $this->get('health-check/debug');
// Assert
$response->assertSuccessful();
$response->assertJsonStructure([
'ip_address',
'hostname',
'timestamp',
'date_time_utc',
'date_time_app',
'timezone',
'secure',
'is_trusted_proxy',
]);
}
}