Add random_tag().

This commit is contained in:
Bharat Mediratta
2010-01-20 21:15:57 -08:00
parent 3a26ace065
commit 2a41e27d49
@@ -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();
}
}