Laravel Application Unit Testing.
Published in
1 min readOct 14, 2019
laravel testing, #code4mk , #testing
Laravel built with testing in mind. Laravel support PHPUnit testing.
# 1. Configure xml file
NB: bash cli
# command with bash cli
./vendor/bin/phpunit --configuration /path/to/laravel_project/phpunit.xml
# 2. Make a Test
php artisan make:test AppTest --unit
# 3. Run Test
# all file
./vendor/bin/phpunit
# specific file
./vendor/bin/phpunit tests/Unit/AppTest.php
# Database test
~ .env database