File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
src/Tempest/Storage/tests Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 44
55use League \Flysystem \UnableToWriteFile ;
66use PHPUnit \Framework \TestCase ;
7- use Tempest \Filesystem \LocalFilesystem ;
7+ use RecursiveDirectoryIterator ;
8+ use RecursiveIteratorIterator ;
89use Tempest \Storage \Config \LocalStorageConfig ;
910use Tempest \Storage \GenericStorage ;
1011
@@ -16,8 +17,18 @@ protected function tearDown(): void
1617 {
1718 parent ::tearDown ();
1819
19- $ filesystem = new LocalFilesystem ();
20- $ filesystem ->deleteDirectory ($ this ->fixtures );
20+ $ files = new RecursiveIteratorIterator (
21+ new RecursiveDirectoryIterator ($ this ->fixtures , RecursiveDirectoryIterator::SKIP_DOTS ),
22+ RecursiveIteratorIterator::CHILD_FIRST ,
23+ );
24+
25+ foreach ($ files as $ file ) {
26+ $ file ->isDir ()
27+ ? @rmdir ($ file ->getRealPath ())
28+ : @unlink ($ file ->getRealPath ());
29+ }
30+
31+ @rmdir ($ this ->fixtures );
2132 }
2233
2334 public function test_storage_write (): void
You can’t perform that action at this time.
0 commit comments