Skip to content

Dockerizing Laravel application and try running PHPUnit test coverage

Notifications You must be signed in to change notification settings

hamzahjamad/laravel-docker-phpunit-coverage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

Run this command to install packages

docker run --rm -v $(pwd):/app composer bash -c "composer install && composer run-script post-root-package-install && composer run-script post-create-project-cmd"

Run this command to start the application

docker-compose up

Run this command to fix permission

docker-compose exec app bash -c "chmod +x fix-permission.sh && ./fix-permission.sh"

Run this command to run migration

docker-compose exec app php artisan migrate

Test

Run test coverage

docker-compose exec app bash -c "./vendor/bin/phpunit --coverage-html ./tests/coverage_results"

The coverage report can be found in /tests/coverage_results folder.

This is the index page. alt text

This is the dashboard page. alt text

This is one of the file page. alt text

Reference

About

Dockerizing Laravel application and try running PHPUnit test coverage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages