PHPackages                             symplify/easy-coding-standard-tester - 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. symplify/easy-coding-standard-tester

Abandoned → [symplify/easy-coding-standard](/?search=symplify%2Feasy-coding-standard)ArchivedLibrary[Testing &amp; Quality](/categories/testing)

symplify/easy-coding-standard-tester
====================================

The Best Way to Test Sniffs and Fixers

v9.3.20(4y ago)3158.8k↓95%2MITPHPPHP &gt;=7.3

Since Mar 31Pushed 4y ago1 watchersCompare

[ Source](https://github.com/deprecated-packages/easy-coding-standard-tester)[ Packagist](https://packagist.org/packages/symplify/easy-coding-standard-tester)[ Fund](https://www.paypal.me/rectorphp)[ GitHub Sponsors](https://github.com/tomasvotruba)[ RSS](/packages/symplify-easy-coding-standard-tester/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (349)Used By (2)

The Best Way to Test Fixers and Sniffs
======================================

[](#the-best-way-to-test-fixers-and-sniffs)

[![Downloads total](https://camo.githubusercontent.com/552edcad54b1581c834901e6a7d052edceedfdd541fdbbb128c5bc44050b3b54/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73796d706c6966792f656173792d636f64696e672d7374616e646172642d7465737465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/symplify/easy-coding-standard-tester/stats)

Do you write your own fixer and sniffs? Would you like to test them without having to learn a lot about their internals?

**This package make fixer and sniff testing with 1 single approach super easy**.

Install
-------

[](#install)

```
composer require symplify/easy-coding-standard-tester --dev
```

Usage
-----

[](#usage)

1. Extend `Symplify\EasyCodingStandardTester\Testing\AbstractCheckerTestCase` class
2. Provide files to `doTestFiles()` method

```
namespace Your\CodingStandard\Tests\Fixer\YourFixer;

use Iterator;
use Symplify\EasyCodingStandardTester\Testing\AbstractCheckerTestCase;
use Symplify\EasyTesting\DataProvider\StaticFixtureFinder;
use Symplify\SmartFileSystem\SmartFileInfo;
use Your\CondingStandard\Fixer\YourFixer;

final class YourFixerTest extends AbstractCheckerTestCase
{
    /**
     * @dataProvider provideData()
     */
    public function test(SmartFileInfo $fileInfo): void
    {
        $this->doTestFileInfo($fileInfo);
    }

    public function provideData(): Iterator
    {
        return StaticFixtureFinder::yieldDirectory(__DIR__ . '/Fixture');
    }

    /**
     * @dataProvider provideDataWithFileErrors()
     */
    public function testFileErrors(SmartFileInfo $fileInfo, int $expectedErrorCount): void
    {
        $this->doTestFileInfoWithErrorCountOf($fileInfo, $expectedErrorCount);
    }

    public function provideDataWithFileErrors(): Iterator
    {
        yield [new SmartFileInfo(__DIR__ . '/Fixture/wrong.php.inc'), 1];
        yield [new SmartFileInfo(__DIR__ . '/Fixture/correct.php.inc'), 0];
    }

    protected function getCheckerClass(): string
    {
        return YourFixer::class;
    }
}
```

Instead of `[__DIR__ . '/wrong/wrong.php.inc', __DIR__ . '/fixed/fixed.php.inc']` you can use single file: `__DIR__ . '/fixture/fixture.php.inc'` in this format:

```

-----

```

In pseudo-code:

```
before
------
after
```

Report Issues
-------------

[](#report-issues)

In case you are experiencing a bug or want to request a new feature head over to the [Symplify monorepo issue tracker](https://github.com/symplify/symplify/issues)

Contribute
----------

[](#contribute)

The sources of this package are contained in the Symplify monorepo. We welcome contributions for this package on [symplify/symplify](https://github.com/symplify/symplify).

###  Health Score

41

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 94.4% 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.

###  Release Activity

Cadence

Every ~3 days

Total

348

Last Release

1798d ago

Major Versions

v4.8.0 → v5.0.02018-09-15

v5.4.16 → v6.0.02019-05-28

v6.1.0 → v7.0.02019-11-23

v7.3.18 → v8.0.0-beta12020-05-16

8.3.48 → 9.0.0-BETA12020-11-14

PHP version history (5 changes)v4.0.0alpha5PHP ^7.1

v7.0.0PHP ^7.2

8.2.17PHP ^7.2|^8.0

8.3.0PHP &gt;=7.2

9.0.0-rc1PHP &gt;=7.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/924196?v=4)[Tomas Votruba](/maintainers/TomasVotruba)[@TomasVotruba](https://github.com/TomasVotruba)

---

Top Contributors

[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (17 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (1 commits)")

### Embed Badge

![Health badge](/badges/symplify-easy-coding-standard-tester/health.svg)

```
[![Health](https://phpackages.com/badges/symplify-easy-coding-standard-tester/health.svg)](https://phpackages.com/packages/symplify-easy-coding-standard-tester)
```

###  Alternatives

[timacdonald/log-fake

A drop in fake logger for testing with the Laravel framework.

4235.9M54](/packages/timacdonald-log-fake)[jasonmccreary/laravel-test-assertions

A set of helpful assertions when testing Laravel applications.

3513.9M31](/packages/jasonmccreary-laravel-test-assertions)[ergebnis/phpunit-slow-test-detector

Provides facilities for detecting slow tests in phpunit/phpunit.

1468.1M72](/packages/ergebnis-phpunit-slow-test-detector)[typo3/testing-framework

The TYPO3 testing framework provides base classes for unit, functional and acceptance testing.

675.0M773](/packages/typo3-testing-framework)[robiningelbrecht/phpunit-pretty-print

Prettify PHPUnit output

76460.0k15](/packages/robiningelbrecht-phpunit-pretty-print)[webmozarts/strict-phpunit

Enables type-safe comparisons of objects in PHPUnit

31252.7k5](/packages/webmozarts-strict-phpunit)

PHPackages © 2026

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