Alex\MailCatcher\Behat\MailCatcherContext::beforeScenario PHP Method

beforeScenario() public method

public beforeScenario ( )
    public function beforeScenario()
    {
        if (!$this->purgeBeforeScenario) {
            return;
        }
        $this->currentMessage = null;
        try {
            $this->getMailCatcherClient()->purge();
        } catch (\Exception $e) {
            @trigger_error("Unable to purge mailcatcher: " . $e->getMessage());
        }
    }