modified version handling
All checks were successful
CI/CD Pipeline / deploy (push) Successful in 24s
CI/CD Pipeline / promote_stable (push) Successful in 2s

This commit is contained in:
2026-02-24 19:29:04 +01:00
parent 6a2316c6f4
commit 16e0444fa3
3 changed files with 47 additions and 10 deletions

View File

@@ -53,13 +53,16 @@ namespace {
it('fetches build count and syncs composer metadata', function (): void {
withComposerBackupForFetch(function (): void {
Setting::updateOrCreate(['key' => 'version'], ['value' => '1.2.3']);
Setting::updateOrCreate(['key' => 'version'], ['value' => '0.0.0']);
$composer = json_decode((string) file_get_contents(base_path('composer.json')), true);
$expectedVersion = (string) ($composer['version'] ?? '');
$exitCode = Artisan::call('version:fetch');
expect($exitCode)->toBe(0);
$build = Setting::where('key', 'build')->value('value');
expect(is_numeric($build))->toBeTrue();
expect(Setting::where('key', 'version')->value('value'))->toBe($expectedVersion);
});
});