PHP 单元测试框架 Testify

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

软件介绍

Testify(Testify.php) 是个极小的 PHP 5.3+ 单元测试框架。

代码示例:

require 'vendor/autoload.php';

use Math\MyCalc;
use Testify\Testify;$tf = new Testify("MyCalc Test Suite");$tf->beforeEach(function($tf) {
    $tf->data->calc = new MyCalc(10);});$tf->test("Testing the add() method", function($tf) {
    $calc = $tf->data->calc;

    $calc->add(4);
    $tf->assert($calc->result() == 14);

    $calc->add(-6);
    $tf->assertEquals($calc->result(), 8);});$tf->test("Testing the mul() method", function($tf) {
    $calc = $tf->data->calc;

    $calc->mul(1.5);
    $tf->assertEquals($calc->result(), 12);

    $calc->mul(-1);
    $tf->assertEquals($calc->result(), -12);});$tf();

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

The Elements of Statistical Learning

The Elements of Statistical Learning

Trevor Hastie、Robert Tibshirani、Jerome Friedman / Springer / 2009-10-1 / GBP 62.99

During the past decade there has been an explosion in computation and information technology. With it have come vast amounts of data in a variety of fields such as medicine, biology, finance, and mark......一起来看看 《The Elements of Statistical Learning》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

URL 编码/解码
URL 编码/解码

URL 编码/解码