PHP 单元测试

Simple Test for PHP

如果有过单元测试经验,学起来几乎不用费功夫, 它的web_tester用起来特别爽^-^,从此不用每次测试都手工打开页面,填写表单等烦人的动作了。交给web_tester就可以了。

3 Responses to “PHP 单元测试”

  1. rongjunXue Says:

    解决 simpletest 输出的测试结果报告中文乱码问题:
    1、找到reporter.php
    2、定位到类HtmlReporter
    3、定位到该类的方法HtmlReporter
    4、把该方法的参数$character_set默认值改成与你测试的网页编码一致即可。
    另:PHP支持的编码表Table 312. Supported charsets:
    http://www.php.net/manual/en/function.htmlentities.php

  2. rongjunXue Says:

    下载包中,关于报告的文档:
    simpletest\docs\en\reporter_documentation.html

  3. rongjunXue Says:

    官方教程;
    http://www.lastcraft.com/simple_test.php

Leave a Reply