heru-luin / tdd-sample-project
测试驱动开发(TDD)项目起点
v1.0
2019-09-23 14:18 UTC
Requires
- php: >=7.1
Requires (Dev)
- phan/phan: ^2.2
- phpunit/phpunit: ^7
- squizlabs/php_codesniffer: *
This package is auto-updated.
Last update: 2024-09-24 01:16:15 UTC
README
此仓库包含使用测试驱动开发(TDD)的项目起点。
仓库状态
Packagist
安装
composer create-project heru-luin/tdd-sample-project --stability dev
cd tdd-sample-project
chmod +x bin/red.sh bin/green.sh bin/refactor.sh
用法
遵循3个TDD步骤
1. RED
创建一个失败的测试。
通过使用 bin/red.sh
验证此步骤
2. GREEN
使测试通过。
通过使用 bin/green.sh
验证此步骤
3. REFACTOR
重构代码直到它变得简洁。
通过使用 bin/refactor.sh
验证此步骤
4. 重复
回到步骤1。