The [PHPUnit Polyfills](https://github.com/Yoast/PHPUnit-Polyfills) were created to allow devs to write tests for the latest version of PHPUnit, while still allowing those tests to run on older PHPUnit versions.
Full disclosure: I'm the author of the library.
Note: this library is the [endorsed](https://phpunit.de/supported-versions.html) by the author of PHPUnit as the way to support PHPUnit cross-version compatible tests.