diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-21 01:29:25 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-21 01:29:25 +0000 |
commit | 81e87dfecdcd645dad6583373540ea182a50cea2 (patch) | |
tree | 677b796f7f4ef02354687a18f24b7082703f849b /modules/comment/tests | |
parent | 8f87a030c8abe447feac22022fa6223248979601 (diff) |
Change "datetime" to "created" to give some semantics to this field.
Diffstat (limited to 'modules/comment/tests')
-rw-r--r-- | modules/comment/tests/Comment_Helper_Test.php | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/modules/comment/tests/Comment_Helper_Test.php b/modules/comment/tests/Comment_Helper_Test.php index 74f784b2..a4dbb88a 100644 --- a/modules/comment/tests/Comment_Helper_Test.php +++ b/modules/comment/tests/Comment_Helper_Test.php @@ -26,22 +26,11 @@ class Comment_Helper_Test extends Unit_Test_Case { $this->assert_equal($rand, $comment->email); $this->assert_equal($rand, $comment->text); $this->assert_equal($rand, $comment->item_id); - $this->assert_equal($rand, $comment->datetime); - } - - public function create_comment_using_current_time_test() { - $rand = rand(); - $comment = comment::create($rand, $rand, $rand, $rand); - - $this->assert_equal($rand, $comment->author); - $this->assert_equal($rand, $comment->email); - $this->assert_equal($rand, $comment->text); - $this->assert_equal($rand, $comment->item_id); - $this->assert_true($comment->datetime > time() - 10 && $comment->datetime <= time()); + $this->assert_true(!empty($comment->created)); } public function format_elapsed_time_test() { - /* This test could be improved by using random numbers and specifically testing corner cases. */ + // This test could be improved by using random numbers and specifically testing corner cases. $now = time(); $yesterday = $now - comment::SECONDS_IN_A_DAY; |