localheinz / phpunit-framework-constraint
Provides additional constraints and assertions for phpunit/phpunit
Fund package maintenance!
localheinz
Requires
- php: ^7.2
- phpunit/phpunit: ^8.5.0
- sebastian/diff: ^3.0.2
Requires (Dev)
- ergebnis/php-cs-fixer-config: ~1.1.0
- ergebnis/phpstan-rules: ~0.14.0
- ergebnis/test-util: ~0.9.0
- infection/infection: ~0.13.6
- localheinz/composer-normalize: ^1.3.1
- phpstan/extension-installer: ^1.0.3
- phpstan/phpstan: ~0.12.3
- phpstan/phpstan-deprecation-rules: ~0.12.0
- phpstan/phpstan-strict-rules: ~0.12.0
- dev-main
- 0.2.1
- 0.2.0
- 0.1.0
- dev-fix/archive
- dev-dependabot/composer/ergebnis/php-cs-fixer-config-2.7.0
- dev-dependabot/composer/phpstan/phpstan-0.12.59
- dev-dependabot/composer/sebastian/diff-3.0.3
- dev-dependabot/composer/phpunit/phpunit-8.5.13
- dev-dependabot/github_actions/gr2m/create-or-update-pull-request-action-v1.3.3
- dev-dependabot/github_actions/shivammathur/setup-php-2.9.0
- dev-dependabot/github_actions/actions/stale-v3.0.14
- dev-dependabot/composer/ergebnis/test-util-1.4.0
- dev-dependabot/github_actions/actions/github-script-v3.1
This package is auto-updated.
Last update: 2020-12-13 09:41:43 UTC
README
Provides additional constraints for phpunit/phpunit
.
Installation
Run
$ composer require ergebnis/phpunit-framework-constraint
Usage
Import the Ergebnis\PHPUnit\Framework\Constraint\Provider
trait into your test class:
<?php declare(strict_types=1); namespace Foo\Bar\Test\Unit; use Ergebnis\PHPUnit\Framework\Constraint\Provider; use PHPUnit\Framework\TestCase; final class BazTest extends TestCase { use Provider; }
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?
📬 Subscribe to my list, and I will occasionally send you an email to let you know what I am working on.