PHPackages                             dataground/recursive-phpunit-test-generator - 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. dataground/recursive-phpunit-test-generator

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

dataground/recursive-phpunit-test-generator
===========================================

Recursively create PhpUnit test skeletons by convention for a composer project using PSR autoloading and naming

2.0.4(1y ago)01.3kMITPHPPHP &gt;7.1

Since Jun 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/dataground/recursive-phpunit-test-generator)[ Packagist](https://packagist.org/packages/dataground/recursive-phpunit-test-generator)[ RSS](/packages/dataground-recursive-phpunit-test-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (13)Used By (0)

PHPUnit test generator
======================

[](#phpunit-test-generator)

Recursively create PhpUnit test skeletons by convention for a composer project using PSR autoloading and naming. It will generate skeleton tests for all classes in the source folder recursively. It will skip interfaces and existing tests. Target folders will be created based on source folders.

Usage
-----

[](#usage)

```
php bin/testcreator /my/project /my/project/tests/unit

```

### Example class (src/My/NameSpace/Foo.php)

[](#example-class-srcmynamespacefoophp)

```
namespace My\NameSpace;

class Foo {

    public function bar() {
        ... some code
    }

}

```

### Resulting test (test/unit/My/NameSpace/FooTest.php)

[](#resulting-test-testunitmynamespacefootestphp)

```
namespace My\NameSpace;

/*
@TODO Public API to cover:
@covers My\NameSpace\Foo::bar()
*/

class FooTest extends TestCase {

    /**
     * @type My\NameSpace\Foo;
     */
    private $foo = null;

    /**
     *
     */
    protected function setUp():void
    {
        parent::setUp();
        // $this->foo = new Foo( ... );
    }

    /**
     *
     */
    protected function tearDown():void
    {
        // $this->foo = null;
        parent::tearDown();
    }

    /**
     *
     */
    public function testTodo()
    {
        $this->markTestSkipped('Tests not implemented yet for Foo');
    }

}

```

TODO
----

[](#todo)

- Put logic in classes
- Add tests (duh..)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance42

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 78% 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 ~320 days

Recently: every ~538 days

Total

12

Last Release

462d ago

Major Versions

0.2.0 → 1.1.02015-07-14

1.4.0 → 2.0.02019-03-22

PHP version history (3 changes)1.0.0PHP 5.5.\*

1.3.0PHP &gt;5.5

2.0.0PHP &gt;7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/294096?v=4)[PK](/maintainers/dataground)[@dataground](https://github.com/dataground)

---

Top Contributors

[![dataground](https://avatars.githubusercontent.com/u/294096?v=4)](https://github.com/dataground "dataground (32 commits)")[![mrdm-nl](https://avatars.githubusercontent.com/u/6248354?v=4)](https://github.com/mrdm-nl "mrdm-nl (9 commits)")

---

Tags

phpunittestgeneratorSkeletonunittest

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dataground-recursive-phpunit-test-generator/health.svg)

```
[![Health](https://phpackages.com/badges/dataground-recursive-phpunit-test-generator/health.svg)](https://phpackages.com/packages/dataground-recursive-phpunit-test-generator)
```

###  Alternatives

[infyomlabs/laravel-generator

InfyOm Laravel Generator

3.8k2.3M13](/packages/infyomlabs-laravel-generator)[ta-tikoma/phpunit-architecture-test

Methods for testing application architecture

10745.9M13](/packages/ta-tikoma-phpunit-architecture-test)[kenjis/ci-phpunit-test

An easier way to use PHPUnit with CodeIgniter 3.x

5861.2M3](/packages/kenjis-ci-phpunit-test)[php-mock/php-mock-phpunit

Mock built-in PHP functions (e.g. time()) with PHPUnit. This package relies on PHP's namespace fallback policy. No further extension is needed.

1718.2M399](/packages/php-mock-php-mock-phpunit)[ergebnis/phpunit-slow-test-detector

Provides facilities for detecting slow tests in phpunit/phpunit.

1468.1M72](/packages/ergebnis-phpunit-slow-test-detector)[zenstruck/assert

Standalone, lightweight, framework agnostic, test assertion library.

8214.9M8](/packages/zenstruck-assert)

PHPackages © 2026

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