From bf7ab8904aa9ccbb201b1ef9634a8b13834e5f6d Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 7 Dec 2008 08:46:44 +0000 Subject: Change ORM_MPTT::add_to_parent() to take an ORM instead of an id so that it's consistent with ORM_MPTT::move_to() --- core/tests/Access_Helper_Test.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/tests/Access_Helper_Test.php') diff --git a/core/tests/Access_Helper_Test.php b/core/tests/Access_Helper_Test.php index 0f453f15..c924575d 100644 --- a/core/tests/Access_Helper_Test.php +++ b/core/tests/Access_Helper_Test.php @@ -50,7 +50,8 @@ class Access_Helper_Test extends Unit_Test_Case { } public function adding_and_removing_items_adds_ands_removes_rows_test() { - $item = ORM::factory("item")->add_to_parent(1); + $root = ORM::factory("item", 1); + $item = ORM::factory("item")->add_to_parent($root); // Simulate an event access::add_item($item); @@ -70,7 +71,8 @@ class Access_Helper_Test extends Unit_Test_Case { } public function can_allow_deny_and_reset_intent_test() { - $item = ORM::factory("item")->add_to_parent(1); + $root = ORM::factory("item", 1); + $item = ORM::factory("item")->add_to_parent($root); access::add_item($item); $intent = ORM::factory("access_intent")->where("item_id", $item->id)->find(); -- cgit v1.2.3