File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -52,11 +52,13 @@ public function _before(TestCase $test)
52
52
$ this ->configurator = new Configurator ();
53
53
$ this ->configurator ->setDebugMode (FALSE );
54
54
$ this ->configurator ->setTempDirectory ($ tempDir );
55
- $ this ->configurator ->addParameters ([
56
- 'container ' => [
57
- 'class ' => $ this ->getContainerClass (),
58
- ],
59
- ]);
55
+ if (!class_exists ('Nette\DI\ContainerLoader ' )) { // Nette 2.2 compatibility
56
+ $ this ->configurator ->addParameters ([
57
+ 'container ' => [
58
+ 'class ' => $ this ->getContainerClass (),
59
+ ],
60
+ ]);
61
+ }
60
62
$ this ->configurator ->onCompile [] = function ($ config , Compiler $ compiler ) {
61
63
$ compiler ->addExtension ('arachne.codeception ' , new CodeceptionExtension ());
62
64
};
@@ -69,9 +71,8 @@ public function _before(TestCase $test)
69
71
70
72
// Generates and loads the container class.
71
73
// The actual container is created later.
72
- $ this ->configurator ->createContainer ();
74
+ $ class = get_class ( $ this ->configurator ->createContainer () );
73
75
74
- $ class = $ this ->getContainerClass ();
75
76
// Cannot use $this->configurator->createContainer() directly beacuse it would call $container->initialize().
76
77
// Container initialization is called laiter by NetteConnector.
77
78
$ this ->container = new $ class ;
You can’t perform that action at this time.
0 commit comments