mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 17:04:14 +01:00
Better VFS test cleanup
This commit is contained in:
parent
ac41289ecd
commit
38add67ea9
@ -26,6 +26,7 @@ class StreamWrapperTest extends Vfs\StreamWrapperBase
|
||||
|
||||
protected function setUp() : void
|
||||
{
|
||||
$this->files[] = $this->getFilename('',false);
|
||||
$this->createShare();
|
||||
parent::setUp();
|
||||
}
|
||||
|
@ -109,9 +109,16 @@ class SharingBase extends LoggedInTest
|
||||
$this->fail('Tried to remove root');
|
||||
}
|
||||
foreach($this->files as $file)
|
||||
{
|
||||
if(Vfs::is_dir($file) && !Vfs::is_link(($file)))
|
||||
{
|
||||
Vfs::rmdir($file);
|
||||
}
|
||||
else
|
||||
{
|
||||
Vfs::unlink($file);
|
||||
}
|
||||
}
|
||||
Vfs::remove($this->files);
|
||||
|
||||
// Remove any mounts
|
||||
@ -164,6 +171,7 @@ class SharingBase extends LoggedInTest
|
||||
if(!Vfs::is_readable($dir))
|
||||
{
|
||||
Vfs::mkdir($dir);
|
||||
$this->files[] = $dir;
|
||||
}
|
||||
$this->files += $this->addFiles($dir);
|
||||
|
||||
|
@ -121,9 +121,16 @@ abstract class StreamWrapperBase extends LoggedInTest
|
||||
$this->fail('Tried to remove root');
|
||||
}
|
||||
foreach($this->files as $file)
|
||||
{
|
||||
if(Vfs::is_dir($file) && !Vfs::is_link(($file)))
|
||||
{
|
||||
Vfs::rmdir($file);
|
||||
}
|
||||
else
|
||||
{
|
||||
Vfs::unlink($file);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove any mounts
|
||||
foreach($this->mounts as $mount)
|
||||
|
Loading…
Reference in New Issue
Block a user