私は、PHPで最近のAPIラッパーコードのいくつかのために書いている最も単純なスイートを持っています。しかし、テストを実行するたびに、すべてのテストが2回実行されます。
私の発信コード:
require_once(dirname(__FILE__) . '/simpletest/autorun.php');
require_once('CompanyNameAPI.php');
$test = new TestSuite('API test');
$test->addFile(dirname(__FILE__) . '/tests/authentication_test.php');
if (TextReporter::inCli()) {
exit ($test->run(new TextReporter()) ? 0 : 1);
} else {
$test->run(new HtmlReporter());
}
authentication_test.phpは次のようになります:
class Test_CallLoop_Authentication extends UnitTestCase {
function test_ClassCreate(){
$class = new CallLoopAPI();
$this->assertIsA($class, CallLoopAPI);
}
//More tests
}
autorun.phpへのインクルードやauthentication_test.php内のsimpletestへの他の呼び出しもこれ以上ありません。
アイデア?