PHPackages                             feature-ninja/testing-matrix - 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. feature-ninja/testing-matrix

ActiveLibrary

feature-ninja/testing-matrix
============================

Easily test multiple scenarios by creating a testing matrix

0.1.1(1y ago)01.1k↓25%[1 PRs](https://github.com/feature-ninja/testing-matrix/pulls)MITPHPPHP ^8.3CI passing

Since Aug 15Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/feature-ninja/testing-matrix)[ Packagist](https://packagist.org/packages/feature-ninja/testing-matrix)[ RSS](/packages/feature-ninja-testing-matrix/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (4)Used By (0)

Testing Matrix
==============

[](#testing-matrix)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4bc24ea1444c1b65b147bf8db61fabb514a33608c931bff5a79353a3de6448c6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666561747572652d6e696e6a612f74657374696e672d6d61747269782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/feature-ninja/testing-matrix)[![Tests](https://camo.githubusercontent.com/3c7d71ea7f4d7bff864f0990199f32e69565da0c54c0eb79059b3e30ce738ac1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f666561747572652d6e696e6a612f74657374696e672d6d61747269782f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/feature-ninja/testing-matrix/actions/workflows/tests.yml)[![Total Downloads](https://camo.githubusercontent.com/566de4f02dd6dd6325c8f9ccedeb90e32bd26ba16a3f6a83d929180ea06d2684/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666561747572652d6e696e6a612f74657374696e672d6d61747269782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/feature-ninja/testing-matrix)

Easily test multiple scenarios by creating a testing matrix

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

[](#installation)

You can install the package via composer:

```
composer require feature-ninja/testing-matrix
```

Usage
-----

[](#usage)

Create a testing matrix from an array:

```
use FeatureNinja\TestingMatrix\Matrix;

$matrix = Matrix::create([
    'a' => [1, 2],
    'b' => [3, 4],
]);

assert(iterator_to_array($matrix) === [
    'a=1 b=3' => [1, 3],
    'a=1 b=4' => [1, 4],
    'a=2 b=3' => [2, 3],
    'a=2 b=4' => [2, 4],
]);
```

Usage in PHPUnit:

```
use FeatureNinja\TestingMatrix\Matrix;
use PHPUnit\Framework\Attributes\DataProvider;use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;

final class ExampleTest extends TestCase
{
    public static function example_data_provider(): Generator
    {
        yield from Matrix::create([
            'a' => [1, 2],
            'b' => [3, 4],
        ]);
    }

    #[Test]
    #[DataProvider('examples')]
    public function example(int $a, int $b): void
    {
        // ...
    }
}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Roj Vroemen](https://github.com/rojtjo)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance64

Regular maintenance activity

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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.

###  Release Activity

Cadence

Every ~27 days

Total

2

Last Release

614d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a5dc56de17326e155210bbdbc689759955974cb97f9a91642169748e3b837584?d=identicon)[Rojtjo](/maintainers/Rojtjo)

---

Top Contributors

[![rojtjo](https://avatars.githubusercontent.com/u/1123887?v=4)](https://github.com/rojtjo "rojtjo (17 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (14 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/feature-ninja-testing-matrix/health.svg)

```
[![Health](https://phpackages.com/badges/feature-ninja-testing-matrix/health.svg)](https://phpackages.com/packages/feature-ninja-testing-matrix)
```

PHPackages © 2026

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