summaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/BasicStructure.php
diff options
context:
space:
mode:
Diffstat (limited to 'build/integration/features/bootstrap/BasicStructure.php')
-rw-r--r--build/integration/features/bootstrap/BasicStructure.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/build/integration/features/bootstrap/BasicStructure.php b/build/integration/features/bootstrap/BasicStructure.php
index 4330a324ad3..758a2d5d455 100644
--- a/build/integration/features/bootstrap/BasicStructure.php
+++ b/build/integration/features/bootstrap/BasicStructure.php
@@ -346,9 +346,21 @@ trait BasicStructure {
}
/**
+ * @BeforeScenario @local_storage
+ */
+ public static function removeFilesFromLocalStorageBefore(){
+ $dir = "./local_storage/";
+ $di = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);
+ $ri = new RecursiveIteratorIterator($di, RecursiveIteratorIterator::CHILD_FIRST);
+ foreach ( $ri as $file ) {
+ $file->isDir() ? rmdir($file) : unlink($file);
+ }
+ }
+
+ /**
* @AfterScenario @local_storage
*/
- public static function removeFilesFromLocalStorage(){
+ public static function removeFilesFromLocalStorageAfter(){
$dir = "./local_storage/";
$di = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);
$ri = new RecursiveIteratorIterator($di, RecursiveIteratorIterator::CHILD_FIRST);