diff options
Diffstat (limited to 'modules/gallery_unit_test/helpers')
-rw-r--r-- | modules/gallery_unit_test/helpers/test.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gallery_unit_test/helpers/test.php b/modules/gallery_unit_test/helpers/test.php index 5368539f..29a7a79a 100644 --- a/modules/gallery_unit_test/helpers/test.php +++ b/modules/gallery_unit_test/helpers/test.php @@ -47,4 +47,12 @@ class test_Core { static function random_photo($parent=null) { return test::random_photo_unsaved($parent)->save(); } + + static function random_name($item=null) { + $rand = "name_" . rand(); + if ($item && $item->is_photo()) { + $rand .= ".jpg"; + } + return $rand; + } } |