Download the PHP package codeception/specify without Composer

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

Specify

BDD style code blocks for PHPUnit or Codeception

Latest Stable Version Total Downloads Latest Unstable Version License StandWithUkraine

Specify allows you to write your tests in more readable BDD style, the same way you might have experienced with Jasmine. Inspired by MiniTest of Ruby now you combine BDD and classical TDD style in one test.

Installation

Requires PHP >= 7.4

Usage

Specify $this->specify method to add isolated test blocks for your PHPUnit tests!

BDD Example

Specify supports describe-it and describe-should BDD syntax inside PHPUnit

Specify + Verify Example

Use Codeception/Verify for simpler assertions:

Use Case

This tiny library makes your tests readable by organizing them in nested code blocks. This allows to combine similar tests into one but put them inside nested sections.

This is very similar to BDD syntax as in RSpec or Mocha but works inside PHPUnit:

Each code block is isolated. This means call to $this->specify does not change values of properties of a test class. Isolated properties should be marked with @specify annotation.

Failure in specify block won't get your test stopped.

If a test fails you will see specification text in the result.

Isolation

Isolation is achieved by cloning object properties for each specify block. Only properties marked with @specify annotation are cloned.

Objects are cloned using deep cloning method.

If object cloning affects performance, consider turning the clonning off.

Mocks are isolated by default.

A mock defined inside a specify block won't be executed inside an outer test, and mock from outer test won't be triggered inside codeblock.

Examples: DataProviders alternative

You can also use DataProvider functions in examples param.

Can also be used with real data providers:

Before/After

There are also before and after callbacks, which act as setUp/tearDown but for specify.

API

Available methods:

Printer Options

For PHPUnit, add Codeception\Specify\ResultPrinter printer into phpunit.xml

Recommended

License: MIT.


All versions of specify with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0
myclabs/deep-copy Version ^1.10
phpunit/phpunit Version ^8.0|^9.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 codeception/specify contains the following files

Loading the files please wait ....