Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1454d61 commit dafa4d2Copy full SHA for dafa4d2
1 file changed
src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php
@@ -23,6 +23,7 @@
23
*/
24
abstract class WebTestCase extends \PHPUnit_Framework_TestCase
25
{
26
+ static protected $class;
27
static protected $kernel;
28
29
/**
@@ -142,9 +143,11 @@ static protected function getKernelClass()
142
143
144
static protected function createKernel(array $options = array())
145
- $class = static::getKernelClass();
146
+ if (null === static::$class) {
147
+ static::$class = static::getKernelClass();
148
+ }
149
- return new $class(
150
+ return new static::$class(
151
isset($options['environment']) ? $options['environment'] : 'test',
152
isset($options['debug']) ? $options['debug'] : true
153
);
0 commit comments