Changeset 52010 for trunk/tests/phpunit/tests/comment.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment.php
r51587 r52010 180 180 $comment_id = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id ) ); 181 181 182 add_filter( 'wp_update_comment_data', array( $this, ' _wp_update_comment_data_filter' ), 10, 3 );182 add_filter( 'wp_update_comment_data', array( $this, 'wp_update_comment_data_filter' ), 10, 3 ); 183 183 184 184 $result = wp_update_comment( … … 190 190 ); 191 191 192 remove_filter( 'wp_update_comment_data', array( $this, ' _wp_update_comment_data_filter' ), 10, 3 );192 remove_filter( 'wp_update_comment_data', array( $this, 'wp_update_comment_data_filter' ), 10, 3 ); 193 193 194 194 $this->assertWPError( $result ); … … 198 198 * Blocks comments from being updated by returning WP_Error. 199 199 */ 200 public function _wp_update_comment_data_filter( $data, $comment, $commentarr ) {200 public function wp_update_comment_data_filter( $data, $comment, $commentarr ) { 201 201 return new WP_Error( 'comment_wrong', 'wp_update_comment_data filter fails for this comment.', 500 ); 202 202 }
Note: See TracChangeset
for help on using the changeset viewer.