17 lines
1.1 KiB
Plaintext
17 lines
1.1 KiB
Plaintext
Task T5 fallthrough evidence
|
|
|
|
Covered fallback cases in tests/Feature/ServiceImageResolverTest.php:
|
|
|
|
- Service key visual exists in public storage -> returns service filename.
|
|
- Service key visual is null and global key visual exists in public storage -> returns global filename.
|
|
- Service key visual and global key visual are null -> returns null.
|
|
- Service key visual references a missing file, while global key visual exists -> skips missing service file and returns global filename.
|
|
- Background resolver covers the same three branches: service file, global fallback, null.
|
|
|
|
The implementation uses Storage::disk('public')->exists(...) before returning any referenced filename, so nonexistent paths fall through instead of being returned.
|
|
|
|
Verification:
|
|
- Initial RED: ddev exec php artisan test tests/Feature/ServiceImageResolverTest.php failed because App\Services\ServiceImageResolver did not exist.
|
|
- GREEN: ddev exec php artisan test tests/Feature/ServiceImageResolverTest.php passed after implementation.
|
|
- Full suite: ddev exec php artisan test passed with 519 tests / 2627 assertions.
|