【发布时间】:2010-07-09 13:07:51
【问题描述】:
所以,我的单元测试有点问题。我为不同的测试用例写了一些基础类,我想使用一些准备好的测试方法。
即
class ModelTestCase extends PHPUnit_Framework_TestCase {
public function testCreateInstance() { ... }
}
class UserModelTest extends ModelTestCase {
/**
* (at)depends testCreateInstance
*/
public funcion testWhatever($model) { ...}
}
有什么技巧可以让我随心所欲地使用它吗?或者我真的必须在每个班级中编写每个测试吗?
【问题讨论】:
标签: php unit-testing testing phpunit