Download the PHP package ryunosuke/phpunit-extension without Composer

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

PHPUnit Extension

Description

This package adds Fluent interface. and provides Custom assertion.

Install

Usage

Actual class

Simplified chart:

method description return type
__call call original method no thrown actual of method's return or expcetion
__call(...[]) get original method's callable actual of method's callable (with bindings)
__invoke call original __invoke no thrown actual of __invoke's return or expcetion
__invoke(...[]) get original __invoke's callable actual of __invoke's callable (with bindings)
__get get original property no thrown actual of property or expcetion
__set set original property publicly void
offsetGet get ArrayAccess by key actual of key's value
var get property original property
use get original method's callable original method as Closure
callable get original method's callable actual of method's callable
fn get original invoke's callable actual of invoke's callable
do call original method actual of method's return
try call original method no thrown actual of method's return or expcetion
new call class construct no thrown actual of object or expcetion
insteadof apply callable actual of applied value
list return reference argument actual of reference argument
return return original original
echo dump original $this
eval assert constraint directly $this
as set assertion message $this
break mark breakable test $this
and return latest asserted actual actual of latest asserted
final return assertion statistic actual of assertion statistic
declare rewrite source by actual value $this
wasOutputed assert stdout or echo $this
wasErrored assert stderr or throw $this
inElapsedTime assert elapsed time $this

A return value or argument of Actual can transparently use the original method, as shown below.

Custom constraints

Internals:

constraint description
ClosesTo assert float by auto approximation
Contains assert string/iterable/file contains substring/element/content
DatetimeEquals assert Datetimable equals
EqualsFile assert string equals file
EqualsIgnoreWS assert string equals ignoring whitespace
EqualsPath assert path equals other path (compatible posix)
FileContains assert file contains string
FileEquals assert file equals string
FileSizeIs assert file size
HasKey assert array/object has key/property
HtmlMatchesArray assert html string by array
InTime assert processing in time
Is assert value with loosely
IsBetween assert range of number
IsBlank assert blank string
IsCType assert value by ctype_xxx
IsFalsy assert value like a false
IsThrowable assert value is Throwable
IsTruthy assert value like a true
IsValid assert value by filter_var
JsonMatchesArray assert json string based on array
LengthEquals assert string/iterable/file length/count/size
MatchesCountEquals assert matched count element per array
OutputMatches assert output of STDOUT
StringLengthEquals assert length of string
SubsetEquals assert array by subarray
SubsetMatches assert array at preg_match
Throws assert callable should throw exception

Alias:

\ryunosuke\PHPUnit\Actual::$constraintVariations is searching for variation from other constraint.

User defined:

\ryunosuke\PHPUnit\Actual::$constraintNamespaces is searching for constraint namespace.

Code completion

Actual class is using \ryunosuke\PHPUnit\Annotation trait. If declare this class in your project space, then custom method and code completion are enabled.

That ables to use $actual->isH(oge) completion and $actual->isF(uga) method.

Or call \ryunosuke\PHPUnit\Actual::generateAnnotation. This method returns annotation via $constraintVariations and $constraintNamespaces.

TestCaseTrait

This Trait provides testing utility.

Custom printer

This package provides Progress Printer. This printer outputs only in case of failure. It will not output on success.

Custom other

Exporter

This package provides Custom Exporter. This Exporter changes on the following.

CodeCoverage

This package provides Custom CodeCoverage. This CodeCoverage changes on the following.

Release

Versioning is Semantic Versioning.

4.2.1

4.2.0

4.1.0

4.0.0

3.20.2

3.20.1

3.20.0

3.19.0

3.18.0

3.17.0

3.16.0

3.15.0

3.14.0

3.13.1

3.13.0

3.12.0

3.11.0

3.10.1

3.10.0

3.9.0

3.8.1

3.8.0

3.7.1

3.7.0

3.6.0

3.5.0

3.4.0

3.3.0

3.2.0

3.1.0

3.0.1

3.0.0

2.0.1

2.0.0

1.2.0

1.1.2

1.1.1

1.1.0

1.0.0

0.2.0

0.1.0

0.0.0

License

MIT


All versions of phpunit-extension with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
phpunit/phpunit Version 9.*
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 ryunosuke/phpunit-extension contains the following files

Loading the files please wait ....