summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-01-18 12:35:26 -0800
committerBharat Mediratta <bharat@menalto.com>2010-01-18 12:35:26 -0800
commitcac4692510d6b5da0d0a63f2ec54783df6ca86e4 (patch)
tree38a7e7c28e47faa13b3febde87087fb84a034992 /modules
parentb27907fff756cb66339c8b529b04f177e10dc35e (diff)
Don't use rand() as the name. Now that ORM::load_types() is gone, it
won't get coerced to a string, and then we wind up comparing: 12345 != 12345-12321 In the old approach, they'd both be strings so they'd be inequal. But in the new approach the first value is an integer (sinced it came from rand()) so the second value is typecast to an integer which drops everything after the - sign so they appear equal.
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/tests/Album_Helper_Test.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gallery/tests/Album_Helper_Test.php b/modules/gallery/tests/Album_Helper_Test.php
index 1284b8cc..ef0905da 100644
--- a/modules/gallery/tests/Album_Helper_Test.php
+++ b/modules/gallery/tests/Album_Helper_Test.php
@@ -38,7 +38,7 @@ class Album_Helper_Test extends Unit_Test_Case {
}
public function create_conflicting_album_test() {
- $rand = rand();
+ $rand = "name_" . rand();
$root = ORM::factory("item", 1);
$album1 = album::create($root, $rand, $rand, $rand);
$album2 = album::create($root, $rand, $rand, $rand);