File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
src/Symfony/Cmf/Component/Testing/Functional Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 3
3
namespace Symfony \Cmf \Component \Testing \Functional ;
4
4
5
5
use Symfony \Bundle \FrameworkBundle \Test \WebTestCase ;
6
+ use Symfony \Component \DependencyInjection \Container ;
6
7
7
8
/**
8
9
* The base class for Functional and Web tests.
@@ -18,7 +19,11 @@ abstract class BaseTestCase extends WebTestCase
18
19
protected $ db ;
19
20
20
21
protected $ dbManagers = array ();
21
- protected $ containers = array ();
22
+
23
+ /**
24
+ * @var Container
25
+ */
26
+ protected $ container ;
22
27
23
28
/**
24
29
* Return the configuration to use when creating the Kernel.
@@ -38,18 +43,16 @@ protected function getKernelConfiguration()
38
43
/**
39
44
* Gets the container.
40
45
*
41
- * @return \Symfony\Component\DependencyInjection\ Container
46
+ * @return Container
42
47
*/
43
48
public function getContainer ()
44
49
{
45
- $ hash = md5 (serialize ($ this ->settings ));
46
-
47
- if (!isset ($ this ->containers [$ hash ])) {
50
+ if (null === $ this ->container ) {
48
51
$ client = $ this ->createClient ($ this ->getKernelConfiguration ());
49
- $ this ->containers [ $ hash ] = $ client ->getContainer ();
52
+ $ this ->container = $ client ->getContainer ();
50
53
}
51
54
52
- return $ this ->containers [ $ hash ] ;
55
+ return $ this ->container ;
53
56
}
54
57
55
58
/**
You can’t perform that action at this time.
0 commit comments