PHPackages                             phpactor/phpunit-extension - 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. phpactor/phpunit-extension

ActivePhpactor-extension

phpactor/phpunit-extension
==========================

Various integrations for PHPUnit

0.1.4(5y ago)12.0k1[1 issues](https://github.com/phpactor/phpunit-extension/issues)[1 PRs](https://github.com/phpactor/phpunit-extension/pulls)MITPHPPHP ^7.3 || ^8.0CI failing

Since Dec 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/phpactor/phpunit-extension)[ Packagist](https://packagist.org/packages/phpactor/phpunit-extension)[ RSS](/packages/phpactor-phpunit-extension/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (9)Versions (7)Used By (0)

PHPUnit Integration
===================

[](#phpunit-integration)

[![CI](https://github.com/phpactor/phpunit-extension/workflows/CI/badge.svg)](https://github.com/phpactor/phpunit-extension/workflows/CI/badge.svg)

PHPUnit integration for [Phpactor](https://github.com/phpactor/phpactor)

Features
--------

[](#features)

- Type inference for `Assert::instanceOf(Foo::class, 'bar')` (for both member and static versions).
- Generate new test classes

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

[](#installation)

Install Phpactor with the Phpactor binary:

```
$ /path/to/phpactor extension:install phpactor/phpunit-extension
```

You can also install extensions from your editor. See [extensions](https://phpactor.github.io/phpactor/extensions.html) for more details.

Configuration and Usage
-----------------------

[](#configuration-and-usage)

### Test Navigation

[](#test-navigation)

Phpactor allows you to jump to related files, just add the following [configuration](https://phpactor.github.io/phpactor/configuration.html) to jump from your standard source code to the test:

```
{
    "navigator.destinations": {
        "source": "lib\/Test.php"
        "test": "tests\/Unit\/Test.php"
    },
}
```

See [Jump to related file](https://phpactor.github.io/phpactor/navigation.html#jump-to-or-generate-related-file)for more information.

### Test Auto Creation

[](#test-auto-creation)

When jumping to a file which does not exist, Phpactor can offer to create a file for you. This plugin includes a simple `phpunit` class generator, configure (promted) auto-creation as follows:

```
{
    "navigator.autocreate": {
        "source": "default",
        "test": "phpunit"
    }
}
```

TODO
----

[](#todo)

- RPC handlers to run PHPUnit, jump to failing tests?

Contributing
------------

[](#contributing)

This package is open source and welcomes contributions! Feel free to open a pull request on this repository.

Support
-------

[](#support)

- Create an issue on the main [Phpactor](https://github.com/phpactor/phpactor) repository.
- Join the `#phpactor` channel on the Slack [Symfony Devs](https://symfony.com/slack-invite) channel.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~197 days

Total

5

Last Release

1923d ago

PHP version history (2 changes)0.1.2PHP ^7.3

0.1.3PHP ^7.3 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/24ec7d5d6b7ea54007be5d7b4f43800381cc1e22929f7d2276fba30e497fdfa6?d=identicon)[dantleech](/maintainers/dantleech)

---

Top Contributors

[![dantleech](https://avatars.githubusercontent.com/u/530801?v=4)](https://github.com/dantleech "dantleech (21 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/phpactor-phpunit-extension/health.svg)

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

###  Alternatives

[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.8k15.7k](/packages/phpactor-phpactor)[dantleech/fink

Checks Links

2266.3k2](/packages/dantleech-fink)

PHPackages © 2026

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