Skip to content

Commit 844559c

Browse files
committed
add bootstrap config parameter
1 parent 174e9d0 commit 844559c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Codeception/Module/Symfony.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
* * `cache_router`: 'false' - Enable router caching between tests in order to [increase performance](http://lakion.com/blog/how-did-we-speed-up-sylius-behat-suite-with-blackfire)
8787
* * `rebootable_client`: 'true' - Reboot client's kernel before each request
8888
* * `guard`: 'false' - Enable custom authentication system with guard (only for Symfony 5.4)
89+
* * `bootstrap`: 'false' - Enables the environment test setup with the tests/bootstrap.php file or with Symfony DotEnv. If false, it does nothing.
8990
* * `authenticator`: 'false' - Reboot client's kernel before each request (only for Symfony 6.0 or higher)
9091
*
9192
* #### Sample `Functional.suite.yml`
@@ -169,6 +170,7 @@ class Symfony extends Framework implements DoctrineProvider, PartedModule
169170
'em_service' => 'doctrine.orm.entity_manager',
170171
'rebootable_client' => true,
171172
'authenticator' => false,
173+
'bootstrap' => false,
172174
'guard' => false
173175
];
174176

@@ -206,7 +208,9 @@ public function _initialize(): void
206208
}
207209

208210
$this->kernel = new $this->kernelClass($this->config['environment'], $this->config['debug']);
209-
$this->bootstrapEnvironment();
211+
if($this->config['bootstrap']) {
212+
$this->bootstrapEnvironment();
213+
}
210214
$this->kernel->boot();
211215

212216
if ($this->config['cache_router'] === true) {

0 commit comments

Comments
 (0)