1
我几次开始做一些单元测试我的功能,但我真的无法找到如何正确执行此功能。我认为这很容易,但有些东西我错过了。简单的php单元测试,但种类卡住
/**
* Tests model->function()
*/
public function testFunction() {
// TODO Auto-generated model->testFunction()
$this->markTestIncomplete ("function test not implemented");
$this->model->testFunction('', '5');
$this->model->testFunction('test', '');
$this->model->testFunction('test', 'a');
$this->model->testFunction('1', '5');
}
这就是我和phpUnit只是忽略这些测试。 我想要测试我的功能(需要2个参数,两个整数)并检查:
- 这两个参数都不为空吗?
- 都来自整数类型的参数吗?
有人可以帮我这个吗?
非常感谢!
你是我的英雄!非常感谢 !!! – Alex