brickie-toolshed/netbeans-phpunit-support

This package provides another phpunit support to netbeans than the original one.

v0.3.0 2021-03-19 23:19 UTC

This package is auto-updated.

Last update: 2024-12-20 07:33:03 UTC


README

This package provides another phpunit support to netbeans than the original one.

Health status

Travis CI - Build Status Github - Last tag

Supported PHPUnit versions

  • version 0.1.0 supports PHPUnit 4
  • version 0.2.1 supports PHPUnit >= 7 but < 9
  • version 0.3.0 supports PHPUnit >= 9

Installation

Locally

Run composer require brickie-toolshed/netbeans-phpunit-support:[VERSION] within your project directory.

Where [VERSION] is one of the versions above.

Globally

Run composer global require brickie-toolshed/netbeans-phpunit-support:[VERSION] within your project directory.

Where [VERSION] is one of the versions above.

NetBeans configuration

  1. create a phpunit configuration file named phpunit.xml at the root of your project directory
  2. enable phpunit support in the NetBeans Project Properties > Testing panel
  3. check the Use Custom Test Suite checkbox in the NetBeans Project Properties > Testing > PHPUnit panel
  4. click Browse... and select the test suite provider file: ./src/TestSuiteProvider.php of this package
  5. click OK

Note
you can specify the path of a custom phpunit configuration file using TestSuiteProvider::setConfigurationFile("/path/to/config.xml") method in a bootstrap file

Why this package

The TestSuiteProvider class uses the test suite set in your phpunit configuration file.
The default behaviour of the NetBeansSuite class provided by NetBeans is to create the test suite by looking for files in the test directory.
The problem is that the test case lookup lies on hard coded file naming patterns and the phpunit configuration file is not used.

License

This project is licensed under the terms of the MIT License