You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fails if record for given criteria can\'t be found,
429
429
430
-
<p> </p><divclass="alert alert-warning">Module reference is taken from the source code. <ahref="https://github.com/Codeception/module-doctrine2/tree/master/src/Codeception/Module/Doctrine2.php">Help us to improve documentation. Edit module reference</a></div>
430
+
<p> </p><divclass="alert alert-warning">Module reference is taken from the source code. <ahref="https://github.com/Codeception/module-doctrine/tree/master/src/Codeception/Module/Doctrine.php">Help us to improve documentation. Edit module reference</a></div>
Copy file name to clipboardExpand all lines: docs/modules/Symfony.md
+22-26Lines changed: 22 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ This module uses [Symfony's DomCrawler](https://symfony.com/doc/current/componen
23
23
and [HttpKernel Component](https://symfony.com/doc/current/components/http_kernel.html) to emulate requests and test response.
24
24
25
25
* Access Symfony services through the dependency injection container: [`$I->grabService(...)`](#grabService)
26
-
* Use Doctrine to test against the database: `$I->seeInRepository(...)` - see [Doctrine Module](https://codeception.com/docs/modules/Doctrine2)
26
+
* Use Doctrine to test against the database: `$I->seeInRepository(...)` - see [Doctrine Module](https://codeception.com/docs/modules/Doctrine)
27
27
* Assert that emails would have been sent: [`$I->seeEmailIsSent()`](#seeEmailIsSent)
28
28
* Tests are wrapped into Doctrine transaction to speed them up.
29
29
* Symfony Router can be cached between requests to speed up testing.
@@ -34,19 +34,19 @@ and [HttpKernel Component](https://symfony.com/doc/current/components/http_kerne
34
34
35
35
### Config
36
36
37
-
#### Symfony 5.x or 4.4
37
+
#### Symfony 5.4 or higher
38
38
39
-
* app_path: 'src' - Specify custom path to your app dir, where the kernel interface is located.
40
-
* environment: 'local' - Environment used for load kernel
41
-
* kernel_class: 'App\Kernel' - Kernel class name
42
-
* em_service: 'doctrine.orm.entity_manager' - Use the stated EntityManager to pair with Doctrine Module.
43
-
* debug: true - Turn on/off debug mode
44
-
* cache_router: 'false' - Enable router caching between tests in order to [increase performance](http://lakion.com/blog/how-did-we-speed-up-sylius-behat-suite-with-blackfire)
45
-
* rebootable_client: 'true' - Reboot client's kernel before each request
46
-
* guard: 'false' - Enable custom authentication system with guard (only for 4.x and 5.x versions of the symfony)
47
-
* authenticator: 'false' - Reboot client's kernel before each request (only for 6.x versions of the symfony)
39
+
*`app_path`: 'src' - Specify custom path to your app dir, where the kernel interface is located.
40
+
*`environment`: 'local' - Environment used for load kernel
41
+
*`kernel_class`: 'App\Kernel' - Kernel class name
42
+
*`em_service`: 'doctrine.orm.entity_manager' - Use the stated EntityManager to pair with Doctrine Module.
*`cache_router`: 'false' - Enable router caching between tests in order to [increase performance](http://lakion.com/blog/how-did-we-speed-up-sylius-behat-suite-with-blackfire)
45
+
*`rebootable_client`: 'true' - Reboot client's kernel before each request
46
+
*`guard`: 'false' - Enable custom authentication system with guard (only for Symfony 5.4)
47
+
*`authenticator`: 'false' - Reboot client's kernel before each request (only for Symfony 6.0 or higher)
48
48
49
-
##### Example (`functional.suite.yml`) - Symfony 4 Directory Structure
49
+
##### Sample `Functional.suite.yml`
50
50
51
51
modules:
52
52
enabled:
@@ -80,15 +80,15 @@ modules:
80
80
enabled:
81
81
- Symfony:
82
82
part: services
83
-
- Doctrine2:
83
+
- Doctrine:
84
84
depends: Symfony
85
85
- WebDriver:
86
86
url: http://example.com
87
87
browser: firefox
88
88
89
89
{% endhighlight %}
90
90
91
-
If you're using Symfony with Eloquent ORM (instead of Doctrine), you can load the [`ORM` part of Laravel module](https://codeception.com/docs/modules/Laravel5#Parts)
91
+
If you're using Symfony with Eloquent ORM (instead of Doctrine), you can load the [`ORM` part of Laravel module](https://codeception.com/docs/modules/Laravel#Parts)
The check is based on `\Symfony\Component\Mailer\EventListener\MessageLoggerListener`, which means:
729
-
If your app performs a HTTP redirect, you need to suppress it using [stopFollowingRedirects()](https://codeception.com/docs/modules/Symfony#stopFollowingRedirects) first; otherwise this check will *always* pass.
730
-
Starting with version 2.0.0, `codeception/module-symfony` requires your app to use [Symfony Mailer](https://symfony.com/doc/current/mailer.html). If your app still uses [Swift Mailer](https://symfony.com/doc/current/email.html), set your version constraint to `^1.6`.
729
+
If your app performs an HTTP redirect, you need to suppress it using [stopFollowingRedirects()](https://codeception.com/docs/modules/Symfony#stopFollowingRedirects) first; otherwise this check will *always* pass.
The function is based on `\Symfony\Component\Mailer\EventListener\MessageLoggerListener`, which means:
1129
-
If your app performs a HTTP redirect after sending the email, you need to suppress it using [stopFollowingRedirects()](https://codeception.com/docs/modules/Symfony#stopFollowingRedirects) first.
1130
-
Starting with version 2.0.0, `codeception/module-symfony` requires your app to use [Symfony Mailer](https://symfony.com/doc/current/mailer.html). If your app still uses [Swift Mailer](https://symfony.com/doc/current/email.html), set your version constraint to `^1.6`.
1128
+
If your app performs an HTTP redirect after sending the email, you need to suppress it using [stopFollowingRedirects()](https://codeception.com/docs/modules/Symfony#stopFollowingRedirects) first.
1131
1129
See also: [grabSentEmails()](https://codeception.com/docs/modules/Symfony#grabSentEmails)
The function is based on `\Symfony\Component\Mailer\EventListener\MessageLoggerListener`, which means:
1239
-
If your app performs a HTTP redirect after sending the email, you need to suppress it using [stopFollowingRedirects()](https://codeception.com/docs/modules/Symfony#stopFollowingRedirects) first.
1240
-
Starting with version 2.0.0, `codeception/module-symfony` requires your app to use [Symfony Mailer](https://symfony.com/doc/current/mailer.html). If your app still uses [Swift Mailer](https://symfony.com/doc/current/email.html), set your version constraint to `^1.6`.
1237
+
If your app performs an HTTP redirect after sending the email, you need to suppress it using [stopFollowingRedirects()](https://codeception.com/docs/modules/Symfony#stopFollowingRedirects) first.
1241
1238
See also: [grabLastSentEmail()](https://codeception.com/docs/modules/Symfony#grabLastSentEmail)
Checks if the given number of emails was sent (default `$expectedCount`: 1).
1691
1688
1692
1689
The check is based on `\Symfony\Component\Mailer\EventListener\MessageLoggerListener`, which means:
1693
-
If your app performs a HTTP redirect after sending the email, you need to suppress it using [stopFollowingRedirects()](https://codeception.com/docs/modules/Symfony#stopFollowingRedirects) first.
1694
-
Starting with version 2.0.0, `codeception/module-symfony` requires your app to use [Symfony Mailer](https://symfony.com/doc/current/mailer.html). If your app still uses [Swift Mailer](https://symfony.com/doc/current/email.html), set your version constraint to `^1.6`.
1690
+
If your app performs an HTTP redirect after sending the email, you need to suppress it using [stopFollowingRedirects()](https://codeception.com/docs/modules/Symfony#stopFollowingRedirects) first.
0 commit comments