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
Then turn it on in your Codeception suite yaml file
18
-
```
18
+
```yaml
19
19
class_name: FunctionalTester
20
20
modules:
21
21
enabled:
@@ -28,32 +28,33 @@ modules:
28
28
Additional parameters can be fed directly to the Guzzle connection using the `guzzleRequestOptions` variable.
29
29
30
30
The variable `deleteEmailsAfterScenario` can be set to true to ensure that all emails are deleted at the end of each scenario, but it is turned off by default.
31
-
### Added Methods
31
+
32
+
## Added Methods
32
33
This Module adds a few public methods for the user, such as:
33
-
```
34
+
```php
34
35
deleteAllEmails()
35
36
```
36
37
Deletes all emails in Mailpit
37
-
```
38
+
```php
38
39
fetchEmails()
39
40
```
40
41
Fetches all email headers from Mialpit, sorts them by timestamp and assigns them to the current and unread inboxes
41
-
```
42
+
```php
42
43
accessInboxFor($address)
43
44
```
44
45
Filters emails to only keep those that are received by the provided address
45
-
```
46
+
```php
46
47
openNextUnreadEmail()
47
48
```
48
49
Pops the most recent unread email and assigns it as the email to conduct tests on
49
-
```
50
+
```php
50
51
openNextAttachmentInOpenedEmail()
51
52
```
52
53
Pops the next attachment and assigns it as the attachment to conduct tests on
53
54
54
-
###Example Test
55
+
## Example Test
55
56
Here is a simple scenario where we test the content of an email. For a detailed list of all available test methods, please refer to the [Codeception Email Testing Framework][CodeceptionEmailTestingFramework].
Change module name in Codeception configuration file(s) from `MailHog` to `Mailpit`.
125
+
126
+
### Refactor your Cests:
127
+
128
+
* Search for all `$I->...EmailBody(...)` occurrences and refactor to `$I->...EmailTextBody(...)` and/or `$I->...EmailHtmlBody(...)`
129
+
* The name in `$I->canSeeInOpenedEmailSender` is now encapsulated in double quotes. So if you used `$I->canSeeInOpenedEmailSender('My Name <[email protected]>')` before replace it with `$I->canSeeInOpenedEmailSender('"My Name" <[email protected]>');`
0 commit comments