项目作者: ergebnis

项目描述 :
:eyeglasses: Provides additional constraints and assertions for phpunit/phpunit
高级语言: PHP
项目地址: git://github.com/ergebnis/phpunit-framework-constraint.git
创建时间: 2018-10-04T22:34:50Z
项目社区:https://github.com/ergebnis/phpunit-framework-constraint

开源协议:MIT License

下载


phpunit-framework-constraint

Integrate
Prune
Release
Renew

Code Coverage
Type Coverage

Latest Stable Version
Total Downloads

Provides additional constraints for phpunit/phpunit.

Installation

Run

  1. $ composer require ergebnis/phpunit-framework-constraint

Usage

Import the Ergebnis\PHPUnit\Framework\Constraint\Provider trait into your test class:

  1. <?php
  2. declare(strict_types=1);
  3. namespace Foo\Bar\Test\Unit;
  4. use Ergebnis\PHPUnit\Framework\Constraint\Provider;
  5. use PHPUnit\Framework\TestCase;
  6. final class BazTest extends TestCase
  7. {
  8. use Provider;
  9. }

Assertions

In addition to the assertions made available by extending from PHPUnit\Framework\TestCase,
the Provider trait provides the following assertions:

  • assertJsonStringSameAsJsonString(string $expected, string $actual, string $message = ''): void

Changelog

Please have a look at CHANGELOG.md.

Contributing

Please have a look at CONTRIBUTING.md.

Code of Conduct

Please have a look at CODE_OF_CONDUCT.md.

License

This package is licensed using the MIT License.

Please have a look at LICENSE.md.

Curious what I am building?

:mailbox_with_mail: Subscribe to my list, and I will occasionally send you an email to let you know what I am working on.