Make WordPress Core


Ignore:
Timestamp:
09/23/2015 02:46:36 PM (11 years ago)
Author:
boonebgorges
Message:

Fix comment_exists() unit test introduced in [34456].

See #33871.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/includesComment.php

    r34456 r34457  
    77class Tests_Admin_IncludesComment extends WP_UnitTestCase {
    88        public function test_must_match_date_and_author() {
     9                $p1 = $this->factory->post->create();
    910                $c1 = $this->factory->comment->create( array(
    10                         'comment_author' => 'foo',
     11                        'comment_author' => 1,
    1112                        'comment_date' => '2014-05-06 12:00:00',
     13                        'comment_post_ID' => $p1,
    1214                ) );
    1315
     16                $p2 = $this->factory->post->create();
    1417                $c2 = $this->factory->comment->create( array(
    15                         'comment_author' => 'bar',
     18                        'comment_author' => 2,
    1619                        'comment_date' => '2004-01-02 12:00:00',
     20                        'comment_post_ID' => $p2,
    1721                ) );
    1822
    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' ) );
    2125        }
    2226}
Note: See TracChangeset for help on using the changeset viewer.