Skip to content

Commit 0ddba0f

Browse files
committed
improve doc
1 parent d64f89a commit 0ddba0f

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

doc/testing-your-application.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ rules that it defines.
1111
The FOSHttpCache library provides traits and base test classes to help you write
1212
functional tests. Using the traits, you can extend your own (or your
1313
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.
1616

1717
By using the traits, you get:
1818

@@ -185,8 +185,8 @@ integrated.
185185
======================= ========================= ================================================ ===========================================
186186
Constant Getter Default Description
187187
======================= ========================= ================================================ ===========================================
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
190190
``SYMFONY_CACHE_DIR`` ``getCacheDir()`` ``sys_get_temp_dir()`` + ``/foshttpcache-nginx`` directory to use for cache
191191
Must match the configuration of your
192192
HttpCache and must be writable by the user
@@ -204,6 +204,8 @@ proxy::
204204

205205
class YourTest extends \PHPUnit_Framework_TestCase
206206
{
207+
use HttpCaller;
208+
207209
public function testCachingHeaders()
208210
{
209211
// Get some response from your application
@@ -214,6 +216,10 @@ proxy::
214216
}
215217
}
216218

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+
217223
CacheAssertions Trait
218224
~~~~~~~~~~~~~~~~~~~~~
219225

0 commit comments

Comments
 (0)