Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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.
  • Loading branch information...
commit a7a696fc5a28e12871073fb0f5ecb163b450e86a 2 parents 494e28b + 3303155
Fabien Potencier authored March 29, 2012
4  src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php
@@ -35,6 +35,10 @@
35 35
      */
36 36
     static protected function createClient(array $options = array(), array $server = array())
37 37
     {
  38
+        if (null !== static::$kernel) {
  39
+            static::$kernel->shutdown();
  40
+        }
  41
+
38 42
         static::$kernel = static::createKernel($options);
39 43
         static::$kernel->boot();
40 44
 

0 notes on commit a7a696f

Please sign in to comment.
Something went wrong with that request. Please try again.