ergebnis / phpunit-framework-constraint
此包已废弃,不再维护。未建议替代包。
为phpunit/phpunit提供额外的约束和断言
0.2.1
2019-12-15 10:32 UTC
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:40 UTC
README
为phpunit/phpunit
提供额外的约束。
安装
运行
$ composer require ergebnis/phpunit-framework-constraint
用法
将Ergebnis\PHPUnit\Framework\Constraint\Provider
特质导入到测试类中
<?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; }
断言
除了从PHPUnit\Framework\TestCase
扩展得到的断言外,Provider
特质还提供了以下断言
assertJsonStringSameAsJsonString(string $expected, string $actual, string $message = ''): void
更新日志
请查看CHANGELOG.md
。
贡献
请查看CONTRIBUTING.md
。
行为准则
许可
此包使用MIT许可证。
请查看LICENSE.md
。
对我在做什么感兴趣吗?
📬 订阅我的列表,我会偶尔发送电子邮件让您了解我在做什么。