TenantAtlas/apps/platform/tests/Feature/Guards/TestLaneArtifactsContractTest.php
2026-04-16 15:57:39 +02:00

23 lines
830 B
PHP

<?php
declare(strict_types=1);
use Tests\Support\TestLaneReport;
it('keeps lane artifact paths app-root relative under storage/logs/test-lanes', function (): void {
$artifacts = TestLaneReport::artifactPaths('fast-feedback');
expect($artifacts)->toHaveKeys(['junit', 'summary', 'budget', 'report', 'profile']);
foreach (array_values($artifacts) as $relativePath) {
expect($relativePath)->toStartWith('storage/logs/test-lanes/');
}
});
it('keeps only the skeleton file checked into the lane artifact directory', function (): void {
$gitignore = base_path('storage/logs/test-lanes/.gitignore');
expect(file_exists($gitignore))->toBeTrue()
->and((string) file_get_contents($gitignore))->toContain('*')
->and((string) file_get_contents($gitignore))->toContain('!.gitignore');
});