Various integrations for PHPUnit

Installs: 1 975

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 1

Open Issues: 1


0.1.4 2021-02-06 15:14 UTC

This package is auto-updated.

Last update: 2024-06-06 22:30:55 UTC



PHPUnit integration for Phpactor


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


Install Phpactor with the Phpactor binary:

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

You can also install extensions from your editor. See extensions for more details.

Configuration and Usage

Test Navigation

Phpactor allows you to jump to related files, just add the following configuration to jump from your standard source code to the test:

    "navigator.destinations": {
        "source": "lib\/<kernel>Test.php"
        "test": "tests\/Unit\/<kernel>Test.php"

See Jump to related file for more information.

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"


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


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


  • Create an issue on the main Phpactor repository.
  • Join the #phpactor channel on the Slack Symfony Devs channel.