Download the PHP package desarrolla2/test-bundle without Composer
On this page you can find all versions of the php package desarrolla2/test-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download desarrolla2/test-bundle
More information about desarrolla2/test-bundle
Files in desarrolla2/test-bundle
Package test-bundle
Short Description This bundle provides test utilities for symfony2
License MIT
Informations about the package test-bundle
TestBundle
This bundle allows you to perform functional tests quickly and easily with symfony.
Instalation
It is best installed it through packagist
by including desarrolla2/test-bundle
in your project composer.json require:
Usage
You just have to extend WebTestCase to start using the power of this bundle.
Examples
Here are some examples
-
make a request and check that the answer is a 200 in html
- complete a form, send it and check that a 301 returns. We always do redirect, when a form has passed the validation.
As you can see, doing functional tests with this bundle is really easy. Go ahead and discover all the utilities that it brings
Reporting
Each time a request is executed, the result of the response is stored in desarrolla2.request.latest
.
If you have phpunit configured to stop when it fails, here you will have in HTML format the response of the request
that failed, which will allow you to find the error more quickly.
The bundle also brings the command php bin / console phpunit: statistics --env = test
if you execute it it will show
you:
-
A summary of the time taken to execute the tests, how many requests were made, average per request and number of routes not tested.
-
In the file
desarrolla2.routes.tested.txt
the detail of all the requests that were made, and how long it took to execute each one. -
In the file
desarrolla2.tested.pending.txt
the detail of the routes that have not been tested. - In the file
desarrolla2.classes.profile.txt
the detail of the tests executed, and how long it took to execute each one
Contact
You can contact with me on @desarrolla2.
All versions of test-bundle with dependencies
symfony/framework-bundle Version ^5.0|^6.0
desarrolla2/cache Version *
desarrolla2/timer Version *