Test as if there are no tests

dev-main 2020-12-11 21:49 UTC

This package is auto-updated.

Last update: 2023-01-12 02:07:39 UTC


The "Trump Extension" will act as if there are no tests. This is because if you don't have tests, they can't fail right?


You can install Trump Extension via Composer

composer require icanhazstring/phpunit-trump-extension:dev-main --dev


Just enable it by adding the following to your test suite's phpunit.xml file:

<phpunit bootstrap="vendor/autoload.php">
        <listener class="icanhazstring\TrumpExtension\TrumpTestListener" />

Now run your test suite as normal.

In CI tools environments, test suites execution will end with No Tests execute! ( exit code 0) whether or not your assertions are false or unwanted exceptions are thrown.


phpunit-trump-extension is available under the MIT License.