PHP 测试框架 Peridot

码农软件 · 软件分类 · 单元测试工具 · 2019-11-18 11:57:27

软件介绍

Peridot 是一个支持 PHP 5.4+ 的高可扩展、用起来很方便的 PHP 测试框架。Peridot 让测试更加有趣。开发者可以创建插件,自定义测试报告等。

特性:

  • 灵活的测试接口

  • 事件驱动的插件架构

  • 可轻松添加用户定义的命令行参数

  • 轻松创建自定义测试报告

  • 基于异常的 Pass/fail

  • 通过子范围实现功能混入

  • 可创建你自己的测试 DSL

示例:

<?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)

本文地址:https://codercto.com/soft/d/19252.html

Learning Web App Development

Learning Web App Development

Semmy Purewal / O'Reilly Media / 2014-3-3 / USD 29.99

Grasp the fundamentals of web application development by building a simple database-backed app from scratch, using HTML, JavaScript, and other open source tools. Through hands-on tutorials, this pract......一起来看看 《Learning Web App Development》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具