From bbeb69dadc7ca5e724907e81d35bb392f27b4480 Mon Sep 17 00:00:00 2001 From: Gintautas Miselis Date: Wed, 13 Nov 2019 19:19:26 +0200 Subject: [PATCH] Regenerated documentation from source --- documentation.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/documentation.md b/documentation.md index c679e41..cc7b5fe 100644 --- a/documentation.md +++ b/documentation.md @@ -28,8 +28,23 @@ modules: This will use static method of `MyDb::createEntityManager()` to establish the Entity Manager. -By default, the module will wrap everything into a transaction for each test and roll it back afterwards. By doing this -tests will run much faster and will be isolated from each other. +By default, the module will wrap everything into a transaction for each test and roll it back afterwards +(this is controlled by the `cleanup` setting). +By doing this, tests will run much faster and will be isolated from each other. + +To use the Doctrine2 Module in acceptance tests, set up your `acceptance.suite.yml` like this: + +```yaml +modules: + enabled: + - Symfony: + part: SERVICES + - Doctrine2: + depends: Symfony +`` + +You cannot use `cleanup: true` in an acceptance test, since Codeception and your app (i.e. browser) are using two +different connections to the database, so Codeception can't wrap changes made by the app into a transaction. ## Status