File tree 3 files changed +24
-1
lines changed
3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ method::
118
118
'The name of the bundle should be suffixed with \'Bundle\''
119
119
);
120
120
}
121
+
121
122
return $answer;
122
123
},
123
124
false,
@@ -154,7 +155,7 @@ You can also ask and validate a hidden response::
154
155
$dialog = $this->getHelperSet()->get('dialog');
155
156
156
157
$validator = function ($value) {
157
- if (trim($value) == '' ) {
158
+ if ('' === trim($value)) {
158
159
throw new \Exception('The password can not be empty');
159
160
}
160
161
Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ object-oriented interface using a variety of session storage drivers.
12
12
Sessions are used via the simple :class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Session `
13
13
implementation of :class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ SessionInterface ` interface.
14
14
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
+
15
21
Quick example::
16
22
17
23
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:
279
279
280
280
The host ``hello.example.com `` will be set on each route loaded from the new
281
281
routing 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