16 lines
521 B
PHP
16 lines
521 B
PHP
<?php
|
|
|
|
it('returns version and build info from composer metadata', function (): void {
|
|
$composer = json_decode((string) file_get_contents(base_path('composer.json')), true);
|
|
$expectedVersion = (string) ($composer['version'] ?? '');
|
|
$expectedBuild = isset($composer['build']) ? (int) $composer['build'] : null;
|
|
|
|
$response = $this->getJson('/api/version');
|
|
|
|
$response->assertOk();
|
|
$response->assertJsonFragment([
|
|
'version' => $expectedVersion,
|
|
'build' => $expectedBuild,
|
|
]);
|
|
});
|