WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment.php

    r36146 r35475  
    279279    }
    280280
    281     public function test_wp_new_comment_notify_postauthor_should_send_email_when_comment_is_approved() {
    282         $c = self::factory()->comment->create( array(
    283             'comment_post_ID' => self::$post_id,
    284         ) );
    285 
    286         $sent = wp_new_comment_notify_postauthor( $c );
    287         $this->assertTrue( $sent );
    288     }
    289 
    290     public function test_wp_new_comment_notify_postauthor_should_not_send_email_when_comment_is_unapproved() {
    291         $c = self::factory()->comment->create( array(
    292             'comment_post_ID' => self::$post_id,
    293             'comment_approved' => '0',
    294         ) );
    295 
    296         $sent = wp_new_comment_notify_postauthor( $c );
    297         $this->assertFalse( $sent );
    298     }
    299 
    300281    /**
    301282     * @ticket 33587
     
    305286            'comment_post_ID' => self::$post_id,
    306287            'comment_approved' => 'spam',
    307         ) );
    308 
    309         $sent = wp_new_comment_notify_postauthor( $c );
    310         $this->assertFalse( $sent );
    311     }
    312 
    313     /**
    314      * @ticket 35006
    315      */
    316     public function test_wp_new_comment_notify_postauthor_should_not_send_email_when_comment_has_been_trashed() {
    317         $c = self::factory()->comment->create( array(
    318             'comment_post_ID' => self::$post_id,
    319             'comment_approved' => 'trash',
    320288        ) );
    321289
Note: See TracChangeset for help on using the changeset viewer.