HOR-3208
Web Entry 2.0 Rest - Skin EP ACCEPTANCE CRITERIAS: 1. Get list of global and installed skins. 2. Verify that the list includes skins available only for the workspace.
This commit is contained in:
@@ -66,6 +66,16 @@ class WorkflowTestCase extends TestCase
|
||||
chdir($pwd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean the shared folder to only have the sites.
|
||||
*/
|
||||
protected function cleanShared()
|
||||
{
|
||||
$this->rrmdir(PATH_DATA.'skins');
|
||||
mkdir(PATH_DATA.'skins');
|
||||
clearstatcache();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the text of and specific translated message.
|
||||
*
|
||||
@@ -91,4 +101,17 @@ class WorkflowTestCase extends TestCase
|
||||
unset($translation[$msgId]);
|
||||
}
|
||||
}
|
||||
|
||||
private function rrmdir($dir)
|
||||
{
|
||||
if (!is_dir($dir)) {
|
||||
return;
|
||||
}
|
||||
$files = array_diff(scandir($dir), array('.', '..'));
|
||||
foreach ($files as $file) {
|
||||
(is_dir("$dir/$file") && !is_link($dir)) ? $this->rrmdir("$dir/$file")
|
||||
: unlink("$dir/$file");
|
||||
}
|
||||
return rmdir($dir);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user