We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f665e14 commit e7f44eaCopy full SHA for e7f44ea
components/routing/hostname_pattern.rst
@@ -282,3 +282,19 @@ You can also set the host option on imported routes:
282
283
The host ``hello.example.com`` will be set on each route loaded from the new
284
routing resource.
285
+
286
+Testing your Controllers
287
+------------------------
288
289
+You need to set the Host HTTP header on your request objects if you want to get
290
+past url matching in your functional tests.
291
292
+ .. code-block:: php
293
294
+ $crawler = $client->request(
295
+ 'GET',
296
+ '/homepage',
297
+ array(),
298
299
+ array('HTTP_HOST' => 'm.' . $client->getContainer()->getParameter('domain'))
300
+ );
0 commit comments