Alex\MailCatcher\Behat\MailCatcherTrait::findMail PHP Method

findMail() protected method

protected findMail ( $type, $value ) : Message
return Message
    protected function findMail($type, $value)
    {
        $criterias = array($type => $value);
        $message = $this->getMailCatcherClient()->searchOne($criterias);
        if (null === $message) {
            throw new \InvalidArgumentException(sprintf('Unable to find a message with criterias "%s".', json_encode($criterias)));
        }
        return $message;
    }