-
-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* make directory recursive Signed-off-by: michael <[email protected]> * add utils test case Signed-off-by: michael <[email protected]> --------- Signed-off-by: michael <[email protected]>
- Loading branch information
1 parent
84e49b5
commit 7955c80
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Knuckles\Scribe\Tests\Unit; | ||
|
||
use Knuckles\Scribe\Tests\BaseLaravelTest; | ||
use Knuckles\Scribe\Tools\Utils; | ||
|
||
class UtilsTest extends BaseLaravelTest | ||
{ | ||
/** @test */ | ||
public function make_directory_recursive() | ||
{ | ||
$dir = __DIR__ . '/test_dir'; | ||
Utils::makeDirectoryRecursive($dir); | ||
$this->assertDirectoryExists($dir); // Directory exists | ||
|
||
if (rmdir($dir)) { // Remove the directory | ||
dump("Directory deleted successfully: $dir"); | ||
} else { // If deletion fails, you can handle the error as needed | ||
dump("Failed to delete directory: $dir"); | ||
} | ||
} | ||
} |