https://github.com/punktde/codeception-mailhog
https://github.com/punktde/codeception-mailhog
codeception
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/punktde/codeception-mailhog
- Owner: punktDe
- License: gpl-3.0
- Created: 2019-07-31T12:06:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-13T13:01:37.000Z (almost 2 years ago)
- Last Synced: 2024-11-14T21:42:12.206Z (about 1 year ago)
- Topics: codeception
- Language: PHP
- Size: 24.4 KB
- Stars: 1
- Watchers: 6
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# punktde/codeception-mailhog
## Gherkin Steps and module functions to test using Mailhog
### How to use
### Prequesits
You have to have Mailhog installed and have your application configured to send mails to mailhog. See https://github.com/mailhog/MailHog
#### Module
You have to add the `Webdriver` module to your config to use the `Mailhog` module.
Use the module `PunktDe\Codeception\Mailhog\Module\Mailhog` in your `codeception.yaml`. You can configure under which uri the mailhog client is reachable (default is http://127.0.0.1:8025)
```yaml
modules:
enabled:
- WebDriver:
url: 'http://acceptance.dev.punkt.de/'
browser: chrome
restart: true
window_size: 1920x2080
capabilities:
chromeOptions:
args:
- '--headless'
- '--disable-gpu'
- '--disable-dev-shm-usage'
- '--no-sandbox'
- PunktDe\Codeception\Mailhog\Module\Mailhog:
base_uri: http://mailhog.project
```
#### Gherkin steps
Just add the trait `PunktDe\Codeception\Mailhog\ActorTraits\Mailhog` to your testing actor. Then you can use `*.feature` files to write your gherkin tests with the new steps.
##### Example actor
```php