所以,我的Unittests出现了一些问题。我为不同的Testcases编写了一些基础类,我想使用一些准备好的测试方法。PHPUnit:测试依赖于父类的测试
即
class ModelTestCase extends PHPUnit_Framework_TestCase {
public function testCreateInstance() { ... }
}
class UserModelTest extends ModelTestCase {
/**
* (at)depends testCreateInstance
*/
public funcion testWhatever($model) { ...}
}
有什么诀窍使用它,因为我想还是我一定是真的写在每个班级每次考试?