Skip to content
On this page

Testing

We have already implemented PHPUnit Testing for all the features that we developed. We recommend you use PHPUnit Testing for your new features/modules. Here we will show you how can you work with PHPUnit Test.

Prerequisite


  • By default, it will configure the app to use sqlite database while testing. If you want to use MySQL or PostgresSQL then you can change the database configuration in phpunit.xml file.

  • Enable pdo_sqlite on php extension in your server

Run the tests

shell
# It will run all the tests 
php artisan test

# It will run the filtered test only
php artisan test --filter test_authorize_user_can_see_permission_page

TIP

Check the laravel official documentation to know more about Testing.

COPYRIGHT © 2022 Codeshaper, All rights reserved.