watoki/scrut
最新稳定版本:v0.3
Composer 安装命令:
composer require watoki/scrut
包简介
Injectable test classes for PHP.
README 文档
README
Have you ever thought how nice it would be to use dependency injection in your test classes? Search no further!
scrut uses [factory] to inject it's properties. Just extend from Specification (which extends PHPUnit's TestCase)
and define its dependencies by marking injectable properties with <-.
/** * @property DependencyOne one <- * @property NotInjected not (because to arrow) */ class MyTest extends Specification { /** @var DependencyTwo <- **/ public $two; function testSomething() { $this->one->createSomeTestContext(); $this->two->doSomething(); $this->assertTrue($this->one->everythingIsCool()); } }
scrut can be used to create maintainable test suites which can also serve quite nicely as living documentation which then can be published (with dox for example).
统计信息
- 总下载量: 3.96k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 10
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-04-25