An easy way to use the power of Laravel testing inside your OctoberCMS site.
-
Browser testing with Laravel Dusk
example intests/browser/ExampleTest.php
documentation: https://laravel.com/docs/5.5/dusk -
HTTP request testing
example intests/feature/ExampleTest.php
documentation: https://laravel.com/docs/5.5/http-tests -
Unit testing
example intests/unit/ExampleTest.php
- Copy content of this repos in
plugins/inetis/testing
- Go to
plugins/inetis/testing
and runcomposer install
- Run tests
composer test
There is default laravel factories for Backend Users
and RainLab Users in factories
directory. You can adapt them or create new ones.
By default all is configured for the changes made during tests are not persistantes. For this work with Dusk test (that perform real HTTP request) a dump of the database is performed before tests and restored after.