codefroghub / roma
操作罗马数字的实用工具。
0.1.1
2016-08-24 09:39 UTC
Requires
- php: >=5.6
Requires (Dev)
- phpunit/phpunit: ^5.1
- satooshi/php-coveralls: ^1.0
This package is not auto-updated.
Last update: 2024-09-26 02:24:02 UTC
README
操作罗马数字的实用工具。
FROM PHPUNTI STARTER
先决条件
- PHP (https://php.ac.cn/downloads.php)
- Composer (https://getcomposer.org.cn/)
- PHPUnit (https://phpunit.de/)
对于命令行使用,请在全局环境中正确设置。
安装
为项目安装 phpunit
composer install
文件夹结构
Project/
|-- src/ (php source code)
|-- tests/ (Testing files)
|-- composer.json (Composer configuration file)
|-- phpunit.xml (PHPUnit configuration file)
运行 PHPUnit
使用颜色高亮运行 tests/ 文件夹中的所有测试文件
phpunit tests/ --colors
基本的 PHP 测试文件
- 使用
Test
作为命名规范的类。 - 测试类必须扩展
PHPUnit_Framework_TestCase
- 方法名以
test
开头或使用注解/** @test */
<?php class ExampleTest extends PHPUnit_Framework_TestCase { /** @test */ public function test_feature() { // arrange // act // assert } }
PHPUnit 断言 (https://phpunit.de/manual/current/en/appendixes.assertions.html)
访问 PHPUnit 手册 获取更多信息。