Download the PHP package jonathanjfshaw/phpunitbehat without Composer

On this page you can find all versions of the php package jonathanjfshaw/phpunitbehat. 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 phpunitbehat

PHPUnitBehat

PHPUnitBehat provides traits that allow developers to create tests that combine the power & flexibility of PHPUnit with the readability of Behat.

By including these traits in your PHPUnit test classes you can:

Requirements

Installation

composer require jonathanjfshaw/phpunitbehat

Usage

A selection of test traits are provided that help you to make use of Behat within PHPUnit with varying degress of control.

The simplest way is to use PHPUnitBehat\TestTraits\BehatTestTrait in your test's base class.

Create a test that extends the base class, and define a $feature property with corresponding step methods.

Execute your test as usual with phpunit. You should see test output like this:

Running tests

You can specify individual scenarios to run because the scenario title is given as the data provider name. For example to test a scenario with title Undefined:

More complex possibilities exist; see https://phpunit.de/manual/6.5/en/textui.html#textui.examples.filter-patterns.

Failures and errors

Phpunit will report any instance of AssertionFailedError as a failure and other exceptions as errors. In some circumstances you may wish to display certain exceptions as errors. For example, if you're using Mink for web assertions, you may want to report Mink's ExpectationExpection (which is thrown when web content does not match an expectation) as a failure not an error.

To achieve this, in your test's base class you can catch these errors when scenario results are examined, and rethrow them using the provided AssertionFailedWrappedError:

License

MIT.


All versions of phpunitbehat with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2 || ^8.3
phpunit/phpunit Version ^9.0 || ^10 || ^11
behat/behat Version ^3.0.0
symfony/dependency-injection Version ^4.0 || ^5.0 || ^6.0 || ^7.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 jonathanjfshaw/phpunitbehat contains the following files

Loading the files please wait ....