问题
I have de follow code:
include 'simpletest/autorun.php';
include 'config_test.case.php'; // <-- problem
But it not works. I get:
Bad TestSuite [index.php] with error [No runnable test cases in [index.php]]
But if I put the Config class code directly (no "include"), it works. What can I do? Thx =)
回答1:
Ensure you have the correct path to your test cases.
I also use the PHP autoLoader() function to auto-magically resolve my own class paths so they don't need to be inclcuded in the paths.
来源:https://stackoverflow.com/questions/4282061/php-simpletest-how-to-test-included-classes