<?php

declare(strict_types=1);

usesApiSuite();

it('returns the ping contract', function (): void {
    api_test_covers('GET /ping', 'happy');

    $response = api_client()->get('/ping');

    $response
        ->assertStatus(200)
        ->assertEnvelope()
        ->assertSuccess();

    expect($response->data())
        ->toBeArray()
        ->toHaveKey('message', 'pong')
        ->toHaveKey('time')
        ->toHaveKey('backend_version')
        ->toHaveKey('api_commit_sha');
});
