shadiakiki1986 / phpunit-ffa-assertions
该软件包最新版本(0.2.0)没有可用的许可信息。
PHPUnit 的 ffa 断言
0.2.0
2019-04-10 12:22 UTC
Requires
- php: >=7.3
- phpunit/phpunit: ^8.1
Requires (Dev)
- jakub-onderka/php-parallel-lint: ^0.9.2
- phpunit/php-code-coverage: ^7.0
This package is not auto-updated.
Last update: 2024-09-25 11:17:03 UTC
README
未经授权复制自 phpunit/phpunit-dom-assertions
在 FFA 中使用的 PHPUnit 断言
assertQueriesValid()
assertFileEqualsWrap()
(原始的assertFileEquals
在处理大文件时会卡住)
发布于 packagist
安装
推荐通过 composer 安装 PHPUnit FFA 断言,使用命令 composer require --dev shadiakiki1986/phpunit-ffa-assertions
(注意,--dev
是为了将软件包添加到 composer.json
文件中的 require-dev
部分)
使用方法
扩展 \FfaPhp\FfaTestCase
以使用 FFA 断言
class FfaTest1 extends \FfaPhp\FfaTestCase { public function testQueriesValid() { $this->assertQueriesValid('select a from b'); $this->assertQueriesValid('select a from b','prefix message if fail'); } public function testFileEqualsWrap() { $this->assertFileEqualsWrap('path/to/file','some content'); } }
测试
要运行测试套件,您需要 composer。
$ php composer.phar install
$ vendor/bin/phpunit