PHPackages                             cyberpearuk/phpunit-skelgen - 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. cyberpearuk/phpunit-skelgen

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

cyberpearuk/phpunit-skelgen
===========================

Tool that can generate skeleton test classes from production code classes and vice versa

3.0.0(6y ago)094BSD-3-ClausePHPPHP &gt;=7.1

Since May 12Pushed 5y agoCompare

[ Source](https://github.com/cyberpearuk/phpunit-skelgen)[ Packagist](https://packagist.org/packages/cyberpearuk/phpunit-skelgen)[ Docs](https://github.com/sebastianbergmann/phpunit-skeleton-generator)[ RSS](/packages/cyberpearuk-phpunit-skelgen/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (7)Versions (4)Used By (0)

PHPUnit 8 Skeleton Generator
============================

[](#phpunit-8-skeleton-generator)

[![Build Status](https://camo.githubusercontent.com/fba1024039e7a29cc97255f19daed0fe232e902ad3ed1b42a52667c402f1a814/68747470733a2f2f7472617669732d63692e636f6d2f637962657270656172756b2f706870756e69742d736b656c65746f6e2d67656e657261746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/cyberpearuk/phpunit-skeleton-generator)[![codecov](https://camo.githubusercontent.com/55d45dc3ab236a0af72254d1478eff12bd99b709e388f1c79f41081e9a61129c/68747470733a2f2f636f6465636f762e696f2f67682f637962657270656172756b2f706870756e69742d736b656c67656e2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/cyberpearuk/phpunit-skelgen)[![Codacy Badge](https://camo.githubusercontent.com/c3448f318afab77ad5edc25b08d8b24ae55f64ee7e152e548cedeb617c12e72d/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3037343334323335363335623464323538373030323064333333623363393661)](https://www.codacy.com/app/jbuncle/phpunit-skelgen?utm_source=github.com&utm_medium=referral&utm_content=cyberpearuk/phpunit-skelgen&utm_campaign=Badge_Grade)[![Packagist](https://camo.githubusercontent.com/0d6b2c97361f18b0fd561476911c23c07a8f13cf09752d1e58b4f318d427812f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f637962657270656172756b2f706870756e69742d736b656c67656e2e737667)](https://packagist.org/packages/cyberpearuk/phpunit-skelgen)

`phpunit-skelgen` is a tool that can generate skeleton test classes from production code classes and vice versa.

This is a fork of the original [`sebastianbergmann/phpunit-skeleton-generator`](https://github.com/sebastianbergmann/phpunit-skeleton-generator)which was abondoned at ~v4 of PHPUnit, to provide support for PHPUnit 8 and PHP7.1.

This fork is maintained by [www.cyberpear.co.uk](https://www.cyberpear.co.uk).

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

[](#installation)

### Composer

[](#composer)

Simply add a development dependency on `cyberpearuk/phpunit-skelgen` to your project using [Composer](http://getcomposer.org/):

```
    composer require --dev "cyberpearuk/phpunit-skelgen=*"
```

For a system-wide installation via Composer, you can run:

```
    composer global require "cyberpearuk/phpunit-skelgen=*"
```

Make sure you have `~/.composer/vendor/bin/` in your path.

Usage
-----

[](#usage)

### CLI

[](#cli)

`./vendor/bin/phpunit-skelgen --ansi generate-test    `

```
./vendor/bin/phpunit-skelgen --ansi generate-test "My\Namespace" "path/to/src/class" "My\Namespace\ClassNameTest" "/path/to/tests/class"
```

### Assertion Annotations

[](#assertion-annotations)

`phpunit-skelgen` will generate a test case for each assertion defined in the methods doc comment. For example the below will generate 4 test cases:

```
    /**
     * @assert (0, 0) == 0
     * @assert (0, 1) == 1
     * @assert (1, 0) == 1
     * @assert (1, 1) == 2
     */
    public function add($a, $b) {
        return $a + $b;
    }
```

Maintainer
----------

[](#maintainer)

This repository is maintained by [Black Pear Digital](https://www.blackpeardigital.co.uk).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 50.9% 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 ~939 days

Total

3

Last Release

2502d ago

Major Versions

2.0.1 → 3.0.02019-07-03

PHP version history (2 changes)2.0.0PHP &gt;=5.3.3

3.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d2b61c26f3cae0b6e0b8c9e07555b189fe71e5b141e5e1a8129acaace3f674d?d=identicon)[jbuncle](/maintainers/jbuncle)

---

Top Contributors

[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (29 commits)")[![jbuncle](https://avatars.githubusercontent.com/u/11473689?v=4)](https://github.com/jbuncle "jbuncle (23 commits)")[![edorian](https://avatars.githubusercontent.com/u/247397?v=4)](https://github.com/edorian "edorian (1 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (1 commits)")[![tcpiptan](https://avatars.githubusercontent.com/u/246622?v=4)](https://github.com/tcpiptan "tcpiptan (1 commits)")[![MelvinLoos](https://avatars.githubusercontent.com/u/1757355?v=4)](https://github.com/MelvinLoos "MelvinLoos (1 commits)")[![InfopactMLoos](https://avatars.githubusercontent.com/u/22300844?v=4)](https://github.com/InfopactMLoos "InfopactMLoos (1 commits)")

---

Tags

testingphpunitxunitSkeleton

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cyberpearuk-phpunit-skelgen/health.svg)

```
[![Health](https://phpackages.com/badges/cyberpearuk-phpunit-skelgen/health.svg)](https://phpackages.com/packages/cyberpearuk-phpunit-skelgen)
```

###  Alternatives

[phpunit/phpunit

The PHP Unit Testing framework.

20.0k910.7M134.2k](/packages/phpunit-phpunit)[phpunit/php-code-coverage

Library that provides collection, processing, and rendering functionality for PHP code coverage information.

8.9k892.4M1.5k](/packages/phpunit-php-code-coverage)[brianium/paratest

Parallel testing for PHP

2.5k118.8M753](/packages/brianium-paratest)[phpunit/phpunit-selenium

Selenium Server integration for PHPUnit

59610.9M150](/packages/phpunit-phpunit-selenium)[robiningelbrecht/phpunit-coverage-tools

PHPUnit coverage tools

1783.0k33](/packages/robiningelbrecht-phpunit-coverage-tools)

PHPackages © 2026

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