Changeset 34457
- Timestamp:
- 09/23/2015 02:46:36 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesComment.php
r34456 r34457 7 7 class Tests_Admin_IncludesComment extends WP_UnitTestCase { 8 8 public function test_must_match_date_and_author() { 9 $p1 = $this->factory->post->create(); 9 10 $c1 = $this->factory->comment->create( array( 10 'comment_author' => 'foo',11 'comment_author' => 1, 11 12 'comment_date' => '2014-05-06 12:00:00', 13 'comment_post_ID' => $p1, 12 14 ) ); 13 15 16 $p2 = $this->factory->post->create(); 14 17 $c2 = $this->factory->comment->create( array( 15 'comment_author' => 'bar',18 'comment_author' => 2, 16 19 'comment_date' => '2004-01-02 12:00:00', 20 'comment_post_ID' => $p2, 17 21 ) ); 18 22 19 $this->assertNull( comment_exists( 'foo', '2004-01-02 12:00:00' ) );20 $this->assertEquals( $ c1, comment_exists( 'foo', '2014-05-06 12:00:00' ) );23 $this->assertNull( comment_exists( 1, '2004-01-02 12:00:00' ) ); 24 $this->assertEquals( $p1, comment_exists( 1, '2014-05-06 12:00:00' ) ); 21 25 } 22 26 }
Note: See TracChangeset
for help on using the changeset viewer.