mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-22 23:05:18 -04:00
Add random_tag().
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user