在phpunit中,有两个有用的方法markTestSkipped和markTestIncomplete。它们能允许你编写的单元测试中不单是只有通过和失败两种结果。markTestSkipped能让PHPUNIT不去执行某个已经编写好的测试方法。举个例子说明,比如下面的程序:
#div_code img{border:0px;}<?phppublic function testTruePropertyIsTrue()
{
$this->assertTrue($this->_testable->trueProperty,"trueProperty isn't true");
}
public function testTruePropertyIsFalse()
{
$this->assertFalse($this->_testable->trueProperty, "trueProperty isn't false");
}
?>
12下一页阅读全文