merged branch liuggio/webtestcase_kernel_shutdown_before_client (PR #3704)
Commits
-------
3303155
added kernel shutdown before create client, fixed and stashed
Discussion
----------
[FrameworkBundle] WebTestCase createClient doesn't check if static:kernel was already allocated
with this little fix CreateClient shuts down the kernel before booting again.
If you add an echo after the "if" on the line number 38
and run the test you would see that sometime the kernel is not properly umounted.
Bug fix: [no]
Feature addition: [no]
Backwards compatibility break: [no]
Symfony2 tests pass: [yes]
---------------------------------------------------------------------------
by fabpot at 2012-03-29T09:19:07Z
Can you squash your commits before I merge? Thanks.
---------------------------------------------------------------------------
by liuggio at 2012-03-29T10:17:59Z
Done.
This commit is contained in:
commit
a7a696fc5a
@ -35,6 +35,10 @@ abstract class WebTestCase extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
static protected function createClient(array $options = array(), array $server = array())
|
||||
{
|
||||
if (null !== static::$kernel) {
|
||||
static::$kernel->shutdown();
|
||||
}
|
||||
|
||||
static::$kernel = static::createKernel($options);
|
||||
static::$kernel->boot();
|
||||
|
||||
|
Reference in New Issue
Block a user