Download the PHP package morphet81/laravel-kahlan without Composer
On this page you can find all versions of the php package morphet81/laravel-kahlan. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-kahlan
Sofa/laravel-kahlan
Kahlan suite for testing Laravel application providing intuitive kahlan (jasmine based) describe-it syntax with Laravel functional testing goodies.
If I'm saving you some time with my work, you can back me up on Patreon page.
See usage example on https://github.com/jarektkaczyk/kahlan-driven-laravel
Why I should use the package & how it works?
Take a look at the example spec
First use in 3 steps
-
Add to your project
-
Add this line to your kahlan config file (create it if necessary):
- Create your first spec in
/spec
folder, for example/spec/AppSpec.php
and run test suite withvendor/bin/kahlan
. Working example can be found on https://github.com/jarektkaczyk/kahlan-driven-laravel
Optional stuff
-
Should you need to customize .env variables for the test suite, you have 2 options:
- In the
.env.kahlan
file for persistent variables - At runtime:
- In the
-
In your specs you can use all the kahlan features, as well as Laravel testing sugar:
- helpers:
app()
,event()
etc - Application methods
$this->app->method()
or$this->laravel->method()
- Laravel TestCase features, eg.
$this->laravel->get('/')->assertResponseOk()
- Application instance as either of:
$this->app === $this->laravel->app === app()
- helpers:
-
For tests that don't require Laravel there's
--no-laravel
cli option, since booting up the application for each test has huge impact on performance:Alternatively you can provide
NO_LARAVEL=true
in.env
/.env.kahlan
file, then you would enable laravel only when necessary:
Happy coding!
All versions of laravel-kahlan with dependencies
kahlan/kahlan Version ^3.0
phpunit/phpunit Version ~5.0
php Version >=7.0