定位 PHP 时对 Haxe 进行单元测试
Unit test Haxe when targeting PHP
我将使用Haxe 和PHP 目标来开发一个博客系统。我想用 TDD 来写它。自然我会使用数据库。怎么做到的?
也许这会有所帮助,它来自旧文档,但仍然相关 http://old.haxe.org/doc/cross/unit
它也有很好的库,比如 https://github.com/massiveinteractive/MassiveUnit/
这是一个 working setup 使用 MassiveUnit
我为一个宠物项目做的:
./backend/
├── build.hxml
├── Dockerfile
├── src
│ ├── Main.hx
│ └── Stats.hx # unit under test
├── test
│ ├── StatsTest.hx # a simple test case
│ ├── TestMain.hx # tests runner
│ └── TestSuite.hx # collect tests to execute
└── test.hxml
我将使用Haxe 和PHP 目标来开发一个博客系统。我想用 TDD 来写它。自然我会使用数据库。怎么做到的?
也许这会有所帮助,它来自旧文档,但仍然相关 http://old.haxe.org/doc/cross/unit
它也有很好的库,比如 https://github.com/massiveinteractive/MassiveUnit/
这是一个 working setup 使用 MassiveUnit
我为一个宠物项目做的:
./backend/
├── build.hxml
├── Dockerfile
├── src
│ ├── Main.hx
│ └── Stats.hx # unit under test
├── test
│ ├── StatsTest.hx # a simple test case
│ ├── TestMain.hx # tests runner
│ └── TestSuite.hx # collect tests to execute
└── test.hxml