Laravel 5.2 Testing – example

php artisan make:test UserTest

Running on Windows:

E:\server\www\projects\laravel5\myproject>E:\server\www\projects\laravel5\myproject\vendor\bin\phpunit

visit('user/create') // user/create is defined in the routes.php !!!
->type('PHPUnitTest', 'name') //form name
->type('phpunit@test.local', 'email')
->type('1234', 'password')
->type('1234', 'password_confirmation')
->press('Create')
->see('Your account have been created.');

}

}

https://laravel.com/docs/5.2/testing

Two tips to speedup your Laravel tests : https://driesvints.com/blog/two-tips-to-speedup-your-laravel-tests/