Download the PHP package sergekukharev/phpunit-fasttrap without Composer

On this page you can find all versions of the php package sergekukharev/phpunit-fasttrap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

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.
Please rate this library. Is it a good library?

Informations about the package phpunit-fasttrap

phpunit-fasttrap

FastTrap reports on fast-running tests in your PHPUnit test suite right in your console.

Typical usage of it - you need to separate integration tests from unit tests mixed in together. Main benefit of unit test is his speed, so you can detect most of the unit tests between integration by adding this listener.

Installation

FastTrap is installable via Composer and should be added as a require-dev dependency:

composer require --dev sergekukharev/phpunit-fasttrap

Usage

Enable with all defaults by adding the following to your test suite's phpunit.xml file:

Now run your test suite as normal. If tests run that do not exceed threshold (500ms by default), FastTrap will report on them in the console after the suite completes.

Configuration

FastTrap has two configurable parameters:

These configuration parameters are set in phpunit.xml when adding the listener:

This allows you to set your own criteria for "fast" tests, and how many you care to know about.

Custom fast threshold per-test method

You may have a few tests in your suite that take a little bit longer to run, and want to have a higher fast threshold than the rest of your suite.

You can use the annotation @fastThreshold to set a custom fast threshold on a per-test method basis. This number can be higher or lower than the default threshold and will be used in place of the default threshold for that specific test.

Inspiration

This project was inspired by and forked from John Kary's SpeedTrap. There is only one differences between those two - Fast trap is able to detect fast tests.

SpeedTrap project itself was inspired by Rspec's -p option that displays feedback about fast tests.

License

phpunit-fasttrap is available under the MIT License.


All versions of phpunit-fasttrap with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
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 sergekukharev/phpunit-fasttrap contains the following files

Loading the files please wait ....