Пример #1
0
 function testCommentTime()
 {
     $quote = "My grandmother used to swear by this, but personally I was always skeptical.";
     $post_id = $this->factory->post->create();
     $comment_id = $this->factory->comment->create(array('comment_post_ID' => $post_id, 'comment_content' => $quote, 'comment_date' => '2015-08-21 03:24:07'));
     $comment = new TimberComment($comment_id);
     $comment->assertEquals('3:24 am', $comment->time());
 }
Пример #2
0
 function testCommentDate()
 {
     $quote = "So he just shaves his head for no reason? That’s like using a wheelchair for the fun of it!";
     $post_id = $this->factory->post->create();
     $comment_id = $this->factory->comment->create(array('comment_post_ID' => $post_id, 'comment_content' => $quote, 'comment_date' => '2015-08-21 03:24:07'));
     $comment = new TimberComment($comment_id);
     $comment->assertEquals('August 21, 2015', $comment->date());
 }