@@ -98,8 +98,10 @@ Make sure ``symfony/process`` is available in your project:
98
98
99
99
$ composer require symfony/process
100
100
101
- Then set your Varnish configuration (VCL) file. All available configuration
102
- parameters are shown below.
101
+ Then set your Varnish configuration (VCL) file. Configuration is handled either
102
+ by overwriting the getter or by defining a PHP constant. You can set the
103
+ constants in your ``phpunit.xml `` or in the bootstrap file. Available
104
+ configuration parameters are:
103
105
104
106
======================= ========================= ================================================== ===========================================
105
107
Constant Getter Default Description
@@ -109,10 +111,22 @@ Constant Getter Default
109
111
``VARNISH_PORT `` ``getCachingProxyPort() `` ``6181 `` port Varnish listens on
110
112
``VARNISH_MGMT_PORT `` ``getVarnishMgmtPort() `` ``6182 `` Varnish management port
111
113
``VARNISH_CACHE_DIR `` ``getCacheDir() `` ``sys_get_temp_dir() `` + ``/foshttpcache-varnish `` directory to use for cache
112
- ``VARNISH_VERSION `` ``getVarnishVersion() `` ``4 `` installed varnish application version
113
114
``WEB_SERVER_HOSTNAME `` ``getHostName() `` hostname your application can be reached at
114
115
======================= ========================= ================================================== ===========================================
115
116
117
+ The Varnish version is controlled by an environment variable (in case you want
118
+ to test both Varnish 3 and 4 on a continuous integration system). See the
119
+ ``.travis.yml `` of the FOSHttpCache git repository for an example.
120
+
121
+ ==================== ========================= ======= ===========================================
122
+ Environment Variable Getter Default Description
123
+ ==================== ========================= ======= ===========================================
124
+ ``VARNISH_VERSION `` ``getVarnishVersion() `` ``4 `` version of varnish application that is used
125
+ ==================== ========================= ======= ===========================================
126
+
127
+ See ``tests/bootstrap.php `` for an example how this repository uses the version
128
+ information to set the right ``VARNISH_FILE `` constant.
129
+
116
130
Enable Assertions
117
131
'''''''''''''''''
118
132
0 commit comments