Download the PHP package steevanb/php-url-test without Composer
On this page you can find all versions of the php package steevanb/php-url-test. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download steevanb/php-url-test
More information about steevanb/php-url-test
Files in steevanb/php-url-test
Package php-url-test
Short Description Tests all urls of your application
License MIT
Informations about the package php-url-test
php-url-test
Tests all urls of your application
Changelog
Installation
/!\ Keep in mind this is an alpha version /!\
Don't allow to update minor/bug fix versions, as we can break compatibility between bug fixes until final release.
Use it with official Docker image
Instead of install it in your project with Composer, you can use official Docker image.
Launch tests
Read test results and show informations
You can create your own ResultReader, by implementing steevanb\PhpUrlTest\ResultReader\ResultReaderInterface.
Then you can use it as you use ConsoleResultReader, with --reader
parameter.
You can separate readers by ,
:
Stop on error and resume your tests
You have 3 parameters to stop tests when a test fail, and resume tests from the one who fail, or skip it and continue after this one :
Change directory where UrlTest could write files
Dump configuration
YAML test file example
Only request.url is required.
You can define default configurations for all tests in your .urltest.yml file :
ResponseBodyTransformer
A response body transformer will modify response body at 2 differents steps:
expectedResponse.body.transformer
: transform expected responseresponse.body.transformer
: transform response
List of available transformers:
json
: try to decode and reencode value, will transform response to null if data is not a valid JSONuuid
: try to decode response (should be a valid JSON) and replace all UUID value by____UUID____
Create your own ResponseBodyTransformer
To create your own ResponseBodyTransformer, you have to do this steps:
- Create a class who implement
steevanb\PhpUrlTest\ResponseBodyTransformer\ResponseBodyTransformerInterface
- Register your ResponseBodyTransformer with
UrlTest::addResponseBodyTransformer()
Global configuration file
You can define global configurations in urltest.yml.
This configurations will be applied to all tests.
All versions of php-url-test with dependencies
ext-curl Version *
ext-json Version *
steevanb/php-yaml Version ^1.0
symfony/console Version ^3.2||^4.0
symfony/options-resolver Version ^3.2||^4.0
symfony/yaml Version ^3.2||^4.0
symfony/process Version ^3.2||^4.0
symfony/filesystem Version ^3.2||^4.0