mailcare/codeception-module-mailcare 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mailcare/codeception-module-mailcare

Composer 安装命令:

composer require --dev mailcare/codeception-module-mailcare

包简介

MailCare module for Codeception

README 文档

README

MailCare module for Codeception

Installation

composer require "mailcare/codeception-module-mailcare"

Documentation

Module for testing receiving emails using MailCare.

Configuration

  • url optional - API url of your mailcare server (default: https://mailix.xyz/api)
  • login optional - login of your mailcare server
  • password optional - password of your mailcare server
  • timeoutInSeconds optional - Waits up to n seconds for an email to be received (default: 30 seconds)

Example

modules:
    enabled
        - MailCare:
            url: 'https://mailix.xyz/api'
            login: 'https://mailix.xyz/api'
            password: 'https://mailix.xyz/api'

Criterias

  • inbox Filter by inbox (test@example.com).
  • sender Filter by sender (test@example.com).
  • subject Filter by subject (Welcome).
  • since Filter by createdAt (2018-01-19T12:23:27+00:00 or ISO 8601 durations).
  • search Search by inbox or sender or subject (matching).
  • unread Filter only by unread (true).
  • favorite Filter only by favorite (true).

All criterias can be found in the API Documentation of MailCare except for page and limit.

Examples of since with ISO 8601 durations:

  • P1D: one-day duration
  • PT1M: one-minute duration (note the time designator, T, that precedes the time value)

Actions

seeEmailCount

Checks that the email count equals expected value. Waits up to $timeout seconds for the given email to be received.

$I->seeEmailCount(2, [
    'inbox' => 'john@example.org',
    'sender' => 'no-reply@company.com',
    'subject' => 'Welcome John!',
    'since' => 'PT2M',
], 30);
  • param int $expectedCount
  • param array $criterias
  • param int $timeoutInSeconds (optional)

seeEmail

Checks that the given email exists. Waits up to $timeout seconds for the given email to be received.

$I->seeEmail([
    'inbox' => 'john@example.org',
    'sender' => 'no-reply@company.com',
    'subject' => 'Welcome John!',
    'since' => 'PT2M',
], 30);
  • param array $criterias
  • param int $timeoutInSeconds (optional)

dontSeeEmail

Opposite to seeEmail.

$I->dontSeeEmail([
    'inbox' => 'john@example.org',
    'since' => 'PT2M',
], 30);
  • param array $criterias
  • param int $timeoutInSeconds (optional)

grabLinksInLastEmail

In the last email, grabs all the links Waits up to $timeout seconds for the given email to be received.

$I->grabLinksInLastEmail([
    'inbox' => 'john@example.org',
    'since' => 'PT2M',
], 30);

grabTextInLastEmail

In the last email, grabs all the text corresponding to a regex. Waits up to $timeout seconds for the given email to be received.

$I->grabTextInLastEmail('#Password: (?<password>\S+)#', [
    'inbox' => 'john@example.org',
    'subject' => 'Your credentials',
    'since' => 'PT2M',
], 30);
  • param string $regex
  • param array $criterias
  • param int $timeoutInSeconds (optional)
  • return array matches from preg_match_all

mailcare/codeception-module-mailcare 适用场景与选型建议

mailcare/codeception-module-mailcare 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9 次下载、GitHub Stars 达 3, 最近一次更新时间为 2019 年 12 月 31 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「mail」 「testing」 「codeception」 「codeception-module」 「mailcare」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 mailcare/codeception-module-mailcare 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mailcare/codeception-module-mailcare 我们能提供哪些服务?
定制开发 / 二次开发

基于 mailcare/codeception-module-mailcare 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-12-31