diff options
Diffstat (limited to 'modules/gallery_unit_test')
-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 8e483c60..2bb38b81 100644 --- a/modules/gallery_unit_test/helpers/test.php +++ b/modules/gallery_unit_test/helpers/test.php @@ -70,4 +70,12 @@ class test_Core { call_user_func($callback); return ob_get_clean(); } + + static function random_tag() { + $tag = ORM::factory("tag"); + $tag->name = (string)rand(); + + // have to reload because ORM::load has string versions of values that we set as integers. + return $tag->save()->reload(); + } } |