PHP - 最简单 - 如何测试“包含”类

时间:2010-11-26 02:00:23

标签: php testing case simpletest

我遵循代码:

include 'simpletest/autorun.php';
include 'config_test.case.php'; // <-- problem

但它不起作用。我明白了:

Bad TestSuite [index.php] with error [No runnable test cases in [index.php]]

但是如果我直接输入Config类代码(没有“include”),它就可以了。 我能做什么? Thx =)

1 个答案:

答案 0 :(得分:2)

确保您拥有测试用例的正确路径。

我还使用PHP autoLoader()函数自动神奇地解析我自己的类路径,因此不需要在路径中包含它们。