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:
davidcallizaya
2017-05-24 14:04:07 -04:00
parent beb9c68879
commit 4304abc2a6
6 changed files with 299 additions and 13 deletions

View File

@@ -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);
}
}