diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-03-25 15:22:23 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-03-25 15:22:23 +0000 |
commit | 961d5e11cf844e412bfcd8baa0e2d776e0ec2bb6 (patch) | |
tree | ef8bd59763d110802b8a6f3227d95831781dc88e /core/tests/ORM_MPTT_Test.php | |
parent | b909132f54d6dd3a1a9455a3255767ef26bce658 (diff) |
Fix unit tests where the albums, resizes and thumbs directory were
being deleted.
Fix for ticket #182
Diffstat (limited to 'core/tests/ORM_MPTT_Test.php')
-rw-r--r-- | core/tests/ORM_MPTT_Test.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/core/tests/ORM_MPTT_Test.php b/core/tests/ORM_MPTT_Test.php index 7109d43b..2aeea58c 100644 --- a/core/tests/ORM_MPTT_Test.php +++ b/core/tests/ORM_MPTT_Test.php @@ -20,12 +20,7 @@ class ORM_MPTT_Test extends Unit_Test_Case { private function create_item_and_add_to_parent($parent) { - $album = ORM::factory("item"); - $album->type = "album"; - $album->rand_key = ((float)mt_rand()) / (float)mt_getrandmax(); - $album->sort_column = "id"; - $album->sort_order = "ASC"; - $album->add_to_parent($parent); + $album = album::create($parent, rand(), "test album"); return $album; } @@ -141,7 +136,8 @@ class ORM_MPTT_Test extends Unit_Test_Case { $inner1 = self::create_item_and_add_to_parent($outer); $inner2 = self::create_item_and_add_to_parent($outer); - $this->assert_equal(array($inner2->id => null), $outer->children(1, 1)->select_list('id')); + $this->assert_equal(array($inner2->id => $inner2->name), + $outer->children(1, 1)->select_list('id')); } public function children_count_test() { |