summaryrefslogtreecommitdiff
path: root/modules/gallery/tests/Item_Model_Test.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-08-02 12:09:00 -0700
committerBharat Mediratta <bharat@menalto.com>2009-08-02 12:09:00 -0700
commit7ad0808a117fd1db4e94da8d7763ccca1d69350a (patch)
tree3102d84609cfb0412cf431c4ea97fb7c35748d71 /modules/gallery/tests/Item_Model_Test.php
parentf034c6c534ad6a07dacc6e64c7e6b43f139c3831 (diff)
Change the API for getting to the original state of an ORM.
Old API: $obj->original("field_name") New API: $obj->original()->field_name This allows us to revert the varous xxx_updated events back to passing an original ORM as well as the the updated one. This makes for a cleaner event API. Old API: comment_updated($comment) { $comment->original("field_name") } Old API: comment_updated($old, $new) { $old->field_name }
Diffstat (limited to 'modules/gallery/tests/Item_Model_Test.php')
-rw-r--r--modules/gallery/tests/Item_Model_Test.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gallery/tests/Item_Model_Test.php b/modules/gallery/tests/Item_Model_Test.php
index c2773097..0940d076 100644
--- a/modules/gallery/tests/Item_Model_Test.php
+++ b/modules/gallery/tests/Item_Model_Test.php
@@ -147,7 +147,7 @@ class Item_Model_Test extends Unit_Test_Case {
$item->save();
$item->title = "NEW_VALUE";
- $this->assert_same("ORIGINAL_VALUE", $item->original("title"));
+ $this->assert_same("ORIGINAL_VALUE", $item->original()->title);
$this->assert_same("NEW_VALUE", $item->title);
}
}