4747 * modules:
4848 * enabled:
4949 * - Symfony # 'ZF2' or 'Symfony'
50- * - Doctrine2 :
50+ * - Doctrine :
5151 * depends: Symfony # Tells Doctrine to fetch the Entity Manager through Symfony
5252 * cleanup: true # All doctrine queries will be wrapped in a transaction, which will be rolled back at the end of each test
5353 * ```
5757 * ```yaml
5858 * modules:
5959 * enabled:
60- * - Doctrine2 :
60+ * - Doctrine :
6161 * connection_callback: ['MyDb', 'createEntityManager'] # Call the static method `MyDb::createEntityManager()` to get the Entity Manager
6262 * ```
6363 *
6464 * By default, the module will wrap everything into a transaction for each test and roll it back afterwards
6565 * (this is controlled by the `cleanup` setting).
6666 * By doing this, tests will run much faster and will be isolated from each other.
6767 *
68- * To use the Doctrine2 Module in acceptance tests, set up your `acceptance.suite.yml` like this:
68+ * To use the Doctrine Module in acceptance tests, set up your `acceptance.suite.yml` like this:
6969 *
7070 * ```yaml
7171 * modules:
7272 * enabled:
7373 * - Symfony:
7474 * part: SERVICES
75- * - Doctrine2 :
75+ * - Doctrine :
7676 * depends: Symfony
7777 * ```
7878 *
8484 * ```yaml
8585 * modules:
8686 * enabled:
87- * - Doctrine2 :
87+ * - Doctrine :
8888 * purge_mode: 1 # 1: DELETE (=default), 2: TRUNCATE
8989 * ```
9090 *
146146 *
147147 * Note that key is ignored, because actual field name is part of criteria and/or expression.
148148 */
149- class Doctrine2 extends CodeceptionModule implements DependsOnModule, DataMapper
149+ class Doctrine extends CodeceptionModule implements DependsOnModule, DataMapper
150150{
151151 private ?DoctrineProvider $ dependentModule = null ;
152152
@@ -165,14 +165,14 @@ class Doctrine2 extends CodeceptionModule implements DependsOnModule, DataMapper
165165
166166modules:
167167 enabled:
168- - Doctrine2 :
168+ - Doctrine :
169169 connection_callback: [My\ConnectionClass, getEntityManager]
170170
171171Or set a dependent module, which can be either Symfony or ZF2 to get EM from service locator:
172172
173173modules:
174174 enabled:
175- - Doctrine2 :
175+ - Doctrine :
176176 depends: Symfony
177177EOF ;
178178
@@ -503,7 +503,7 @@ public function haveInRepository($classNameOrInstance, array $data = [])
503503 } elseif (is_string ($ classNameOrInstance )) {
504504 $ instance = $ this ->instantiateAndPopulateEntity ($ classNameOrInstance , $ data , $ instances );
505505 } else {
506- throw new InvalidArgumentException (sprintf ('Doctrine2 ::haveInRepository expects a class name or instance as first argument, got "%s" instead ' , gettype ($ classNameOrInstance )));
506+ throw new InvalidArgumentException (sprintf ('Doctrine ::haveInRepository expects a class name or instance as first argument, got "%s" instead ' , gettype ($ classNameOrInstance )));
507507 }
508508
509509 // Flush all changes to database and then refresh all entities. We need this because
0 commit comments