/**
* 測試返回值為字符串類型
*/
public function testReturnString()
{
$expected = 'string';
// 實際情況把下面的'string'換為被測試方法或函數
$result = 'string';
$this->assertEquals($expected, $result);
}
/**
* 測試返回值是數字類型
*/
public function testReturnInt()
{
$expected = 10;
// 實際情況把20換為被測試方法或函數
$result = 20;
$this->assertGreaterThan($expected, $result);
}
/**
文章來源于領測軟件測試網 http://www.kjueaiud.com/