irestful/hack-unit
Composer 安装命令:
composer require irestful/hack-unit
包简介
README 文档
README
This is a xUnit testing framework written in Hack Lang.
Usage
You need to add this project in your "require" section of your composer.json file.
"require": {
"irestful/hack-unit": "dev-master"
}
You then need to create a hackunit.json file and put it in the root directory of your project:
{
"amount_of_logs_per_line": 20,
"include_scripts": ["./vendor/autoload.php"],
"suites": [
{
"directory": "./src/HackUnit/Tests/Tests",
"file_filter": "(.+)Test.hh"
}
]
}
- The "directory" is the path where the application will scan for test suites.
- The "file_filter" is the test suite filter that you must name your test suite classes after.
Creating a Test Suite
Your test suites must extends this class: HackUnit\Infrastructure\Applications\AbstractHackUnitTestApplication
Here's an example of a test suite.
Status
This project is still in beta. To make a release of this project, I need to:
- Test the application properly.
- Add support for code coverage.
- Make it work in strict mode.
Why this project was built?
There was already a project to unit test code written in hack language. However, their API differs dramatically from the PHPUnit API, which was making my code port (from PHP to Hack) a lot harder to execute.
I also needed support for mock objects, which they doesn't currently support. At last, I also had this discussion with the owner of the project and since he planned to re-write his project, and since I had to port my current code from PHP to Hack right away, I decided to work on my own version.
Authors
Steve Rodrigue - steve@irestful.com
统计信息
- 总下载量: 117
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-05-22