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)
5252 $ this ->configurator = new Configurator ();
5353 $ this ->configurator ->setDebugMode (FALSE );
5454 $ 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+ }
6062 $ this ->configurator ->onCompile [] = function ($ config , Compiler $ compiler ) {
6163 $ compiler ->addExtension ('arachne.codeception ' , new CodeceptionExtension ());
6264 };
@@ -69,9 +71,8 @@ public function _before(TestCase $test)
6971
7072 // Generates and loads the container class.
7173 // The actual container is created later.
72- $ this ->configurator ->createContainer ();
74+ $ class = get_class ( $ this ->configurator ->createContainer () );
7375
74- $ class = $ this ->getContainerClass ();
7576 // Cannot use $this->configurator->createContainer() directly beacuse it would call $container->initialize().
7677 // Container initialization is called laiter by NetteConnector.
7778 $ this ->container = new $ class ;
You can’t perform that action at this time.
0 commit comments