mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-02 14:25:38 +08:00
add more FileSystemTest
This commit is contained in:
@@ -121,4 +121,13 @@ class FileSystemTest extends TestCase
|
|||||||
FileSystem::scanDirFiles($this->vfs->url() . '/not_exists');
|
FileSystem::scanDirFiles($this->vfs->url() . '/not_exists');
|
||||||
$this->assertLogged('warning', zm_internal_errcode('E00080') . '扫描目录失败,目录不存在');
|
$this->assertLogged('warning', zm_internal_errcode('E00080') . '扫描目录失败,目录不存在');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testScanDirFilesWithNoPerm(): void
|
||||||
|
{
|
||||||
|
$old_perm = $this->vfs->getPermissions();
|
||||||
|
$this->vfs->chmod(0000);
|
||||||
|
FileSystem::scanDirFiles($this->vfs->url());
|
||||||
|
$this->assertLogged('warning', zm_internal_errcode('E00080') . '扫描目录失败,目录无法读取: ' . $this->vfs->url());
|
||||||
|
$this->vfs->chmod($old_perm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user