Commit 366bf651 authored by Fabien Potencier's avatar Fabien Potencier

merged branch lyrixx/patch-1 (PR #177)

Commits
-------

a3f570d4 [Doc] Changed ArraySessionStorage to FilesystemSessionStorage for functional testing
be168e3b Added doc about session and test

Discussion
----------

Added doc about session and test

---------------------------------------------------------------------------

by fabpot at 2011/09/26 12:57:33 -0700

As noted in the phpdoc, for functional testing, you must use `FilesystemSessionStorage`.

---------------------------------------------------------------------------

by lyrixx at 2011/09/26 14:27:10 -0700

I updated the doc.
parents 9b74b3ed a3f570d4
......@@ -102,6 +102,24 @@ executed before every test.
return $app;
}
.. tip::
If your application use sessions, you have to use ``FilesystemSessionStorage``
to store sessions::
// ...
use Symfony\Component\HttpFoundation\SessionStorage\FilesystemSessionStorage;
// ...
public function createApplication()
{
// ...
$this->app['session.storage'] = $this->app->share(function() {
return new FilesystemSessionStorage(sys_get_temp_dir());
});
// ...
}
The WebTestCase provides a ``createClient`` method. A client acts as a browser,
and allows you to interact with your application. Here's how it works::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment