mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 00:40:06 +01:00
Add a bunch more CLI command tests (#1332)
* Wip some cli tests * Apply fixes from StyleCI * Test parked command * Test forget command * Update Filesystem::rmDirAndContents to respect symlinks * Wip cli commands * Apply fixes from StyleCI * Test link command, unlink command, and secure command * Apply fixes from StyleCI * Add tests for unsecure, unsecure --all, secured commands Add placeholders for the remaining CLI commands Add nginx::restart to unsecure --all command Co-authored-by: StyleCI Bot <bot@styleci.io>
This commit is contained in:
@@ -257,7 +257,11 @@ public function rmDirAndContents(string $path): void
|
||||
$files = new RecursiveIteratorIterator($dir, RecursiveIteratorIterator::CHILD_FIRST);
|
||||
|
||||
foreach ($files as $file) {
|
||||
$file->isDir() ? rmdir($file->getRealPath()) : unlink($file->getRealPath());
|
||||
if ($file->isLink()) {
|
||||
unlink($file->getPathname());
|
||||
} else {
|
||||
$file->isDir() ? rmdir($file->getRealPath()) : unlink($file->getRealPath());
|
||||
}
|
||||
}
|
||||
|
||||
rmdir($path);
|
||||
|
||||
Reference in New Issue
Block a user