PHPackages                             jrmadsen67/mahana-mailinator-test - 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. jrmadsen67/mahana-mailinator-test

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

jrmadsen67/mahana-mailinator-test
=================================

A PHPUnit extension for testing emails via the Mailinator API

47.9k1PHP

Since Oct 16Pushed 10y ago1 watchersCompare

[ Source](https://github.com/jrmadsen67/MahanaMailinatorTest)[ Packagist](https://packagist.org/packages/jrmadsen67/mahana-mailinator-test)[ RSS](/packages/jrmadsen67-mahana-mailinator-test/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

MahanaMailinatorTest
====================

[](#mahanamailinatortest)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/brnlbs/mailinator/blob/master/LICENSE)

A PHPUnit extension for testing emails via the Mailinator API

Requirements
------------

[](#requirements)

You need to have the [cURL](http://php.net/manual/en/book.curl.php)-extension installed on your server. [PHP](http://www.php.net) 5.4 will suffice.

Mahana Mailinator Test depends on the Mahana Mailinator API library (will install with composer, or can be found here: )

Installation
------------

[](#installation)

`composer require jrmadsen67/mahana-mailinator-test`

Usage
-----

[](#usage)

Mahana Mailinator Test is a PHPUnit extension used for functional email testing against the Mailintor API. You will need to get an api token at .

In your tests, create a Mahana Mailinator API object with your token, then pass that object to your Mahana Mailinator Test object:

```
use jrmadsen67\MahanaMailinatorAPI\MahanaMailinatorAPI;
use jrmadsen67\MahanaMailinatorAPI\MahanaMailinatorTest;

$mahanaMailinatorAPI = new MahanaMailinatorAPI($token);
$mahanaMailinatorTest = new MahanaMailinatorTest($mahanaMailinatorAPI);
```

IMPORTANT! You need to *send* emails via your own mail library. This library will only retreive and test the contents.

Examples:

```
// inbox value does not require "@mailinator.com" for the API to retrieve.
$inbox = 'mytestbox@mailinator.com';

//psuedo-code to send an email:
mail_send([
    'to'=>$inbox,
    'subject' => 'My test subject',
    'from'=> 'me@test.com',
    'body' => 'blah, blah, blah',
]);

// get the email you just sent. this is an array.
$email = $mahanaMailinatorTest->getLastMessage($inbox);

//start testing
$mahanaMailinatorTest->assertEmailSubjectContains('test', $email);
$mahanaMailinatorTest->assertEmailSubjectEquals('My test subject', $email);
$mahanaMailinatorTest->assertEmailTextContains('blah', $email);
```

Please read the library source for a full set of functions. (Better specs on the way, I promise!)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/68a4d9bb38657f2c9360f5e953323185bde37c17a22e38848215a876e399e9bd?d=identicon)[jrmadsen67](/maintainers/jrmadsen67)

---

Top Contributors

[![jrmadsen67](https://avatars.githubusercontent.com/u/821958?v=4)](https://github.com/jrmadsen67 "jrmadsen67 (5 commits)")

### Embed Badge

![Health badge](/badges/jrmadsen67-mahana-mailinator-test/health.svg)

```
[![Health](https://phpackages.com/badges/jrmadsen67-mahana-mailinator-test/health.svg)](https://phpackages.com/packages/jrmadsen67-mahana-mailinator-test)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
