}
/**
* 描述:该函数将会在每次测试结束后自动调用,
* 在编写测试类的时候,是个可选函数,可写不可不写
*/
function tearDown()
{
@unlink($this->filename);
}
function testFileExists()
{
$this->assertTrue($this->file->exists());
clearstatcache();
$this->assertTrue(file_exists($this->file->filename));
}
function testCreate()
{
$this->tearDown();
$this->assertFalse(file_exists($this->file->filename));
clearstatcache();
$this->assertTrue($this->file->create());
$this->assertTrue(file_exists($this->file->filename));
}
function testReadWrite()
文章来源于领测软件测试网 https://www.ltesting.net/