Skip to content

PHPUnit-Compat is a compatibility layer for PHPUnit, that allows creating a test case/test suite classes, that will work across different PHPUnit versions.

License

Notifications You must be signed in to change notification settings

console-helpers/phpunit-compat

PHPUnit-Compat

CI codecov Scrutinizer Code Quality

Latest Stable Version Total Downloads License

PHPUnit-Compat is a compatibility layer for PHPUnit, that allows creating a test case/test suite classes, that will work across different PHPUnit versions.

Covered methods:

  • \PHPUnit\Framework\TestCase:onNotSuccessfulTest via \ConsoleHelpers\PHPUnitCompat\AbstractTestCase::onNotSuccessfulTestCompat;
  • PHPUnit\Framework\TestSuite::run via \ConsoleHelpers\PHPUnitCompat\AbstractTestSuite::runCompat;
  • \PHPUnit\Framework\TestSuite::tearDown via \ConsoleHelpers\PHPUnitCompat\AbstractTestSuite::tearDownCompat (till PHPUnit 8.1.6; in PHPUnit 8.2.0 method was removed).

Covered classes:

  • \PHPUnit\Framework\DataProviderTestSuite via \ConsoleHelpers\PHPUnitCompat\Framework\DataProviderTestSuite;
  • \PHPUnit\Framework\TestResult via \ConsoleHelpers\PHPUnitCompat\Framework\TestResult;
  • \PHPUnit\Framework\Test via \ConsoleHelpers\PHPUnitCompat\Framework\Test;
  • \SebastianBergmann\CodeCoverage\CodeCoverage via \ConsoleHelpers\CodeCoverageCompat\CodeCoverage;
  • \SebastianBergmann\CodeCoverage\Driver\Driver' via \ConsoleHelpers\CodeCoverageCompat\Driver\Driver;
  • \SebastianBergmann\CodeCoverage\Filter via \ConsoleHelpers\CodeCoverageCompat\Filter.

For assertion method compatibility please use https://github.com/Yoast/PHPUnit-Polyfills.

Installation

  • Execute this command to add as a dependency: php composer.phar require console-helpers/phpunit-compat.

Contributing

See CONTRIBUTING file.

License

PHPUnit-Compat is released under the BSD-3-Clause License. See the bundled LICENSE file for details.

About

PHPUnit-Compat is a compatibility layer for PHPUnit, that allows creating a test case/test suite classes, that will work across different PHPUnit versions.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages