Closed harry2909 closed 1 year ago
Merging #7 (ab29bed) into dev (43f9554) will increase coverage by
0.65%
. The diff coverage is84.00%
.
@@ Coverage Diff @@
## dev #7 +/- ##
============================================
+ Coverage 70.17% 70.83% +0.65%
- Complexity 20 29 +9
============================================
Files 12 17 +5
Lines 57 72 +15
============================================
+ Hits 40 51 +11
- Misses 17 21 +4
Impacted Files | Coverage Δ | |
---|---|---|
app/Models/Album.php | 0.00% <0.00%> (ø) |
|
app/Models/Song.php | 50.00% <50.00%> (ø) |
|
app/Http/Controllers/APIController.php | 100.00% <100.00%> (ø) |
|
app/Http/Resources/LyricsResource.php | 100.00% <100.00%> (ø) |
|
app/Models/Lyrics.php | 100.00% <100.00%> (ø) |
|
app/Providers/AppServiceProvider.php | 100.00% <100.00%> (ø) |
|
app/Repositories/LyricsRepository.php | 100.00% <100.00%> (ø) |
|
app/Services/LyricsService.php | 100.00% <100.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
:bulb: Description
Following @lambert-o 's advice, I have implemented the REST API with best practices in mind.
This is a WIP. I believe we may need separate interfaces, services, and repos for each model I've created. At the moment, I am just trying to implement/learn the principles.
Now, when starting the project, run
sail php artisan migrate:fresh
and thensail php artisan db:seed --class=AlbumSongLyricsSeeder
With relationships:
Next steps
DB_HOST = MYSQL
, but, the tests will only run locally if theDB_HOST = 127.0.0.1
🤷 . Seems to be resolved by creating a specific testing ENV and making the test suite use that:hammer_and_wrench: Type of change