File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,8 +28,23 @@ modules:
2828
2929This will use static method of ` MyDb::createEntityManager() ` to establish the Entity Manager.
3030
31- By default, the module will wrap everything into a transaction for each test and roll it back afterwards. By doing this
32- tests will run much faster and will be isolated from each other.
31+ By default, the module will wrap everything into a transaction for each test and roll it back afterwards
32+ (this is controlled by the ` cleanup ` setting).
33+ By doing this, tests will run much faster and will be isolated from each other.
34+
35+ To use the Doctrine2 Module in acceptance tests, set up your ` acceptance.suite.yml ` like this:
36+
37+ ``` yaml
38+ modules :
39+ enabled :
40+ - Symfony :
41+ part : SERVICES
42+ - Doctrine2 :
43+ depends : Symfony
44+ ` `
45+
46+ You cannot use `cleanup : true` in an acceptance test, since Codeception and your app (i.e. browser) are using two
47+ different connections to the database, so Codeception can't wrap changes made by the app into a transaction.
3348
3449# # Status
3550
You can’t perform that action at this time.
0 commit comments