@@ -11,8 +11,8 @@ rules that it defines.
11
11
The FOSHttpCache library provides traits and base test classes to help you write
12
12
functional tests. Using the traits, you can extend your own (or your
13
13
framework’s) base test classes. For convenience, you can also extend the
14
- FOSHttpCache base test classes, as they include a sensible set of traits by
15
- default .
14
+ FOSHttpCache base test class suitable for your caching proxy, which includes
15
+ a sensible set of traits .
16
16
17
17
By using the traits, you get:
18
18
@@ -185,8 +185,8 @@ integrated.
185
185
======================= ========================= ================================================ ===========================================
186
186
Constant Getter Default Description
187
187
======================= ========================= ================================================ ===========================================
188
- ``WEB_SERVER_HOSTNAME `` ``getHostName() `` hostname your application can be reached at
189
- ``WEB_SERVER_PORT `` ``getConfigFile () `` The port on which the web server runs
188
+ ``WEB_SERVER_HOSTNAME `` ``getHostName() `` Hostname your application can be reached at
189
+ ``WEB_SERVER_PORT `` ``getCachingProxyPort () `` The port on which the web server runs
190
190
``SYMFONY_CACHE_DIR `` ``getCacheDir() `` ``sys_get_temp_dir() `` + ``/foshttpcache-nginx `` directory to use for cache
191
191
Must match the configuration of your
192
192
HttpCache and must be writable by the user
@@ -204,6 +204,8 @@ proxy::
204
204
205
205
class YourTest extends \PHPUnit_Framework_TestCase
206
206
{
207
+ use HttpCaller;
208
+
207
209
public function testCachingHeaders()
208
210
{
209
211
// Get some response from your application
@@ -214,6 +216,10 @@ proxy::
214
216
}
215
217
}
216
218
219
+ This trait requires the methods ``getHostName() `` and ``getCachingProxyPort() ``
220
+ to exist. When using one of the caching proxy traits, these will be provided by
221
+ the trait, otherwise you have to implement them.
222
+
217
223
CacheAssertions Trait
218
224
~~~~~~~~~~~~~~~~~~~~~
219
225
0 commit comments