summaryrefslogtreecommitdiff
path: root/_testing/core/TestUtils.php
diff options
context:
space:
mode:
Diffstat (limited to '_testing/core/TestUtils.php')
-rw-r--r--_testing/core/TestUtils.php24
1 files changed, 20 insertions, 4 deletions
diff --git a/_testing/core/TestUtils.php b/_testing/core/TestUtils.php
index 4fd56e85d..64de62213 100644
--- a/_testing/core/TestUtils.php
+++ b/_testing/core/TestUtils.php
@@ -1,11 +1,18 @@
<?php
+/**
+ * Helper class with some filesystem utilities.
+ */
class TestUtils {
/**
* helper for recursive copy()
+ *
+ * @static
+ * @param $destdir string
+ * @param $source string
*/
- static function rcopy($destdir, $source) {
+ public static function rcopy($destdir, $source) {
if (!is_dir($source)) {
copy($source, $destdir.'/'.basename($source));
} else {
@@ -25,8 +32,11 @@ class TestUtils {
/**
* helper for recursive rmdir()/unlink()
+ *
+ * @static
+ * @param $target string
*/
- static function rdelete($target) {
+ public static function rdelete($target) {
if (!is_dir($target)) {
unlink($target);
} else {
@@ -42,8 +52,14 @@ class TestUtils {
}
}
- // helper to append text to a file
- static function fappend($file, $text) {
+ /**
+ * helper to append text to a file
+ *
+ * @static
+ * @param $file string
+ * @param $text string
+ */
+ public static function fappend($file, $text) {
$fh = fopen($file, 'a');
fwrite($fh, $text);
fclose($fh);