We warmly welcome contributions to FOSHttpCache. Before you invest a lot of time however, please open an issue on GitHub to discuss your idea. Then we can coordinate efforts if somebody is already working on the same thing.
Testing the Library¶
This chapter describes how to run the tests that are included with this library. Make sure that you have PHPUnit 5.7 or higher installed.
First clone the repository, install the vendors, then run the tests:
$ git clone https://github.com/FriendsOfSymfony/FOSHttpCache.git $ cd FOSHttpCache $ composer install --dev $ phpunit
To run the unit tests separately:
$ phpunit tests/Unit
The library also includes functional tests against a Varnish and NGINX instance. The functional test suite by default uses PHP’s built-in web server. If you have PHP 5.4 or newer, simply run with the default configuration.
To run the functional tests:
$ phpunit tests/Functional
Tests are organized in groups: one for each reverse proxy supported. At the moment groups are: varnish and nginx.
To run only the varnish functional tests:
$ phpunit --group=varnish
For more information about testing, see Testing Your Application.