Codeception / Codeception/module-filesystem
Feature request: \Codeception\Module\Filesystem::writeToFile create a directory recursively.
- 主要语言
- PHP
- 星标
- 20
- 派生
- 7
- PR 合并指标
- 30 天内没有已合并 PR
描述
Scenario:
I want to create a file inside a folder:
`$I->writeToFile('/var/www/foo/foo.php', '');`
This will fail because the folder `foo` does not exist.
Now I have to create the folder recursively and keep track of it for deletion.
```
public function writeToFile($filename, $contents)
{
file_put_contents($filename, $contents);
}
```
This issue is a feature request to make that method more robust, using perhaps Symfony Filesystem to recursively create the directory. Eg: https://symfony.com/doc/current/components/filesystem.html#mkdir
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 Codeception\Module\Filesystem::writeToFile 开始,检查模块现有的测试(如果有)。验证向缺失的嵌套目录中的文件写入能够成功,并且现有行为保持不变;完成时应覆盖 issue 中描述的递归目录场景。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- php
- 领域
- testing
- Issue 类型
- 功能
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100