File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ method::
118118 'The name of the bundle should be suffixed with \'Bundle\''
119119 );
120120 }
121+
121122 return $answer;
122123 },
123124 false,
@@ -154,7 +155,7 @@ You can also ask and validate a hidden response::
154155 $dialog = $this->getHelperSet()->get('dialog');
155156
156157 $validator = function ($value) {
157- if (trim($value) == '' ) {
158+ if ('' === trim($value)) {
158159 throw new \Exception('The password can not be empty');
159160 }
160161
Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ object-oriented interface using a variety of session storage drivers.
1212Sessions are used via the simple :class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Session `
1313implementation of :class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ SessionInterface ` interface.
1414
15+ .. caution ::
16+
17+ Make sure your PHP session isn't already started before using the Session
18+ class. If you have a legacy session system that starts your session, see
19+ http://symfony.com/doc/current/components/http_foundation/session_php_bridge.html
20+
1521Quick example::
1622
1723 use Symfony\Component\HttpFoundation\Session\Session;
Original file line number Diff line number Diff line change @@ -279,3 +279,19 @@ You can also set the host option on imported routes:
279279
280280 The host ``hello.example.com `` will be set on each route loaded from the new
281281routing resource.
282+
283+ Testing your Controllers
284+ ------------------------
285+
286+ You need to set the Host HTTP header on your request objects if you want to get
287+ past url matching in your functional tests.
288+
289+ .. code-block :: php
290+
291+ $crawler = $client->request(
292+ 'GET',
293+ '/homepage',
294+ array(),
295+ array(),
296+ array('HTTP_HOST' => 'm.' . $client->getContainer()->getParameter('domain'))
297+ );
You can’t perform that action at this time.
0 commit comments