File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 6060 *
6161 * This will use static method of `MyDb::createEntityManager()` to establish the Entity Manager.
6262 *
63- * By default, the module will wrap everything into a transaction for each test and roll it back afterwards. By doing this
64- * tests will run much faster and will be isolated from each other.
63+ * By default, the module will wrap everything into a transaction for each test and roll it back afterwards
64+ * (this is controlled by the `cleanup` setting).
65+ * By doing this, tests will run much faster and will be isolated from each other.
66+ *
67+ * To use the Doctrine2 Module in acceptance tests, set up your `acceptance.suite.yml` like this:
68+ *
69+ * ```yaml
70+ * modules:
71+ * enabled:
72+ * - Symfony:
73+ * part: SERVICES
74+ * - Doctrine2:
75+ * depends: Symfony
76+ * ``
77+ *
78+ * You cannot use `cleanup: true` in an acceptance test, since Codeception and your app (i.e. browser) are using two
79+ * different connections to the database, so Codeception can't wrap changes made by the app into a transaction.
6580 *
6681 * ## Status
6782 *
You can’t perform that action at this time.
0 commit comments