PHPackages                             punktde/codeception-mailhog - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. punktde/codeception-mailhog

ActiveLibrary[Testing &amp; Quality](/categories/testing)

punktde/codeception-mailhog
===========================

Provides a module and gherkin steps to access a mailhog api for codeception testing

4.0.1(1y ago)142.2k↑11.3%1GPL-3.0-or-laterPHP

Since Jul 31Pushed 1y ago5 watchersCompare

[ Source](https://github.com/punktDe/codeception-mailhog)[ Packagist](https://packagist.org/packages/punktde/codeception-mailhog)[ RSS](/packages/punktde-codeception-mailhog/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (3)Versions (12)Used By (0)

punktde/codeception-mailhog
===========================

[](#punktdecodeception-mailhog)

Gherkin Steps and module functions to test using Mailhog
--------------------------------------------------------

[](#gherkin-steps-and-module-functions-to-test-using-mailhog)

### How to use

[](#how-to-use)

### Prequesits

[](#prequesits)

You have to have Mailhog installed and have your application configured to send mails to mailhog. See

#### Module

[](#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 )

```
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

[](#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

[](#example-actor)

```
