Download the PHP
package petrkotek/phpunit-naughtytestdetector without Composer
On this page you can find all versions of the php package
petrkotek/phpunit-naughtytestdetector. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor petrkotek Package phpunit-naughtytestdetector Short Description "Naughty test detector" for PHPUnit. Identifies tests, which don't clean after themselves. License
Apache License 2.0
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Informations about the package phpunit-naughtytestdetector
phpunit-naughtytestdetector
"Naughty test detector" for PHPUnit. Identifies tests leaving garbage after themselves.
Many of us have been there - your integration test works in isolation, but breaks when running in a sequence of tests.
This can be very difficult to troubleshoot, but luckily phpunit-naughtytestdetector is here to help.
Requirements
PHPUnit 6.0+
Supported PHP versions: 7.0 and 7.1
Note: for older PHPUnit or PHP 5.6, use v0.2.0.
Installation
NaughtyTestDetector is installable via Composer and should be added as a require-dev dependency:
1. Enable NaughtyTestListener by adding the following to your test suite's phpunit.xml file:
2. Implement the MetricFetcher interface, e.g.:
Tip: You can also use built-in metric fetcher, e.g. PetrKotek\NaughtyTestDetector\MetricFetchers\GlobalsMetricFetcher.
3. Run your test suite.
E.g. phpunit --configuration integration.xml
NaughtyTestListener will fetch metrics before & after each TestSuite (aka "test class") and if there is a difference
between before & after, it prints out like message like this:
This means, that before the test, there was 0 records in the my_table and after executing all the tests, there were
5 records.
Note: If you want to temporarily disable Naughty Test Detector, use DISABLE_NAUGHTY_TEST_DETECTOR enviromental variable, e.g. DISABLE_NAUGHTY_TEST_DETECTOR=1 phpunit --configuration integration.xml.
All versions of phpunit-naughtytestdetector with dependencies
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package petrkotek/phpunit-naughtytestdetector contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.