Download the PHP package macrominds/website-testing without Composer
On this page you can find all versions of the php package macrominds/website-testing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download macrominds/website-testing
More information about macrominds/website-testing
Files in macrominds/website-testing
Package website-testing
Short Description Cross-Platform Helper for functional testing of websites.
License MIT
Informations about the package website-testing
Cross-Platform Helper for functional testing of websites.
Start built-in php server from php unit test
macrominds/website-testing allows you to start the built-in php server directly inside unit tests or other php scripts. Especially useful for functional testing. Helps to reduce external dependencies and to make your project self-contained.
Usage example
A rough usage overview. See below for a detailed example.
See this projects' phpunit.xml to learn how you can define HOST, PORT and DOCROOT for your own project.
Installing macrominds/website-testing
Recommended: Composer
The recommended installation way is through Composer.
Run the Composer command to add the latest stable version of macrominds/website-testing to your development dependencies:
or add it to the appropriate section of your composer.json:
Without Composer
You may as well use macrominds/website-testing without Composer. Just fetch src/EmbeddedServerController.php and then in your php file
There you go. Ready for the detailed example?
Detailed usage example
Testing the behavior of your web application. This example uses Guzzle as the HTTP client and phpunit. It requires the usage of Composer.
Your composer.json
should contain this section:
Make sure to update composer:
Troubleshooting
If you've got any issues or feature-requests, just add it to the Issues section.
Running the tests from your project root in the first place could help tracking down any issues related to your system.
Have fun.