forevermatt/readable-unit-tests-php
Composer 安装命令:
composer require forevermatt/readable-unit-tests-php
包简介
A Gherkin-based PHP unit-testing framework
README 文档
README
A Gherkin-based PHP unit-testing framework
Install it
The easiest way to install Readable Unit Tests (PHP) is to use Composer:
composer require --dev forevermatt/readable-unit-tests-php
Try it out
If you clone this repo, you can use the following command to run the sample tests:
php run-tests.php sample/src
Generate skeleton test files
To generate basic/skeleton test specification and test implementation files, run
something like the following (replacing sample/src with the path to your
files):
php generate-test-files.php sample/src
Goals
- Tests written in Gherkin (aka "plain English")
- The ability to unit test PHP
- One
.testfile per PHP file/class (containing Gherkin) - One corresponding
...Test.phpfile with the PHP implementation of those test steps
Example folder/file structure
- sample
- src/
- Calculator.php (PHP class to be tested)
- tests/
- unit/
- Calculator.test (Gherkin)
- CalculatorTest.php (PHP implementation of test steps)
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-08-23