@@ -299,19 +299,19 @@ A very similar approach can be used for all frameworks that have an ORM implemen
299299In Yii2 and Phalcon, the methods `haveRecord`, `seeRecord`, `dontSeeRecord` work in the same way.
300300They also should be included by specifying `part : ORM` in order to not use the functional testing actions.
301301
302- If you are using Symfony with Doctrine, you don't need to enable Symfony itself but just Doctrine2 :
302+ If you are using Symfony with Doctrine, you don't need to enable Symfony itself but just Doctrine :
303303
304304` ` ` yaml
305305actor: UnitTester
306306modules:
307307 enabled:
308308 - Asserts
309- - Doctrine2 :
309+ - Doctrine :
310310 depends: Symfony
311311 - \H elper\U nit
312312` ` `
313313
314- In this case you can use the methods from the Doctrine2 module, while Doctrine itself uses the Symfony module
314+ In this case you can use the methods from the Doctrine module, while Doctrine itself uses the Symfony module
315315to establish connections to the database. In this case a test might look like :
316316
317317` ` ` php
@@ -321,7 +321,7 @@ function testUserNameCanBeChanged()
321321 // create a user from framework, user will be deleted after the test
322322 $id = $this->tester->haveInRepository(User::class, ['name' => 'miles']);
323323 // get entity manager by accessing module
324- $em = $this->getModule('Doctrine2 ')->em;
324+ $em = $this->getModule('Doctrine ')->em;
325325 // get real user
326326 $user = $em->find(User::class, $id);
327327 $user->setName('bill');
@@ -335,7 +335,7 @@ function testUserNameCanBeChanged()
335335` ` `
336336
337337In both examples you should not be worried about the data persistence between tests.
338- The Doctrine2 and Laravel modules will clean up the created data at the end of a test.
338+ The Doctrine and Laravel modules will clean up the created data at the end of a test.
339339This is done by wrapping each test in a transaction and rolling it back afterwards.
340340
341341# ## Accessing Module
@@ -344,12 +344,12 @@ Codeception allows you to access the properties and methods of all modules defin
344344Unlike using the UnitTester class for this purpose, using a module directly grants you access
345345to all public properties of that module.
346346
347- We have already demonstrated this in a previous example where we accessed the Entity Manager from a Doctrine2 module :
347+ We have already demonstrated this in a previous example where we accessed the Entity Manager from a Doctrine module :
348348
349349` ` ` php
350350<?php
351351/** @var Doctrine\O RM\E ntityManager */
352- $em = $this->getModule('Doctrine2 ')->em;
352+ $em = $this->getModule('Doctrine ')->em;
353353` ` `
354354
355355If you use the `Symfony` module, here is how you can access the Symfony container :
0 commit comments