summaryrefslogtreecommitdiff
path: root/core/tests/ORM_MPTT_Test.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-23 04:36:09 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-23 04:36:09 +0000
commit5713e3c66ed8bab3b86490d7b6e90f7947d53429 (patch)
treee6a4f5e93dd15406c655c7b51d455c5181d3334c /core/tests/ORM_MPTT_Test.php
parent2502240ce4ad25e9fb60ee2468764e25346d2917 (diff)
Change photo::create() and album::create() to take ORM instances
instead of ids.
Diffstat (limited to 'core/tests/ORM_MPTT_Test.php')
-rw-r--r--core/tests/ORM_MPTT_Test.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/tests/ORM_MPTT_Test.php b/core/tests/ORM_MPTT_Test.php
index b969e287..36f1d78b 100644
--- a/core/tests/ORM_MPTT_Test.php
+++ b/core/tests/ORM_MPTT_Test.php
@@ -59,11 +59,12 @@ class ORM_MPTT_Test extends Unit_Test_Case {
}
public function move_to_test() {
- $album1 = album::create(1, "move_to_test_1", "move_to_test_1");
- $album1_1 = album::create($album1->id, "move_to_test_1_1", "move_to_test_1_1");
- $album1_2 = album::create($album1->id, "move_to_test_1_2", "move_to_test_1_2");
- $album1_1_1 = album::create($album1_1->id, "move_to_test_1_1_1", "move_to_test_1_1_1");
- $album1_1_2 = album::create($album1_1->id, "move_to_test_1_1_2", "move_to_test_1_1_2");
+ $root = ORM::factory("item", 1);
+ $album1 = album::create($root, "move_to_test_1", "move_to_test_1");
+ $album1_1 = album::create($album1, "move_to_test_1_1", "move_to_test_1_1");
+ $album1_2 = album::create($album1, "move_to_test_1_2", "move_to_test_1_2");
+ $album1_1_1 = album::create($album1_1, "move_to_test_1_1_1", "move_to_test_1_1_1");
+ $album1_1_2 = album::create($album1_1, "move_to_test_1_1_2", "move_to_test_1_1_2");
$album1_2->reload();
$album1_1_1->reload();