Peridot 介绍
Peridot 是一个支持 PHP 5.4+ 的高可扩展、用起来很方便的 PHP 测试框架。Peridot
让测试更加有趣。开发者可以创建插件,自定义测试报告等。
特性:
示例:
<?PHP //arrayobject.spec.PHP describe('ArrayObject', function() { beforeEach(function() { $this->arrayObject = new ArrayObject(['one', 'two', 'three']); }); describe('->count()', function() { it("should return the number of items", function() { $count = $this->arrayObject->count(); assert($count === 3, "expected 3"); }); }); }); ?> $ peridot arrayobject.spec.PHP ArrayObject ->count() ✓ should return the number of items 1 passing (19 ms)