Changeset 49004 for trunk/tests/phpunit/tests/comment/slashes.php
- Timestamp:
- 09/19/2020 10:53:15 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/slashes.php
r49003 r49004 38 38 // Not testing comment_author_email or comment_author_url 39 39 // as slashes are not permitted in that data. 40 $data = array(40 $data = array( 41 41 'comment_post_ID' => $post_id, 42 42 'comment_author' => $this->slash_1, … … 46 46 'comment_content' => $this->slash_7, 47 47 ); 48 $ id= wp_new_comment( $data );48 $comment_id = wp_new_comment( $data ); 49 49 50 $comment = get_comment( $ id );50 $comment = get_comment( $comment_id ); 51 51 52 52 $this->assertSame( wp_unslash( $this->slash_1 ), $comment->comment_author ); 53 53 $this->assertSame( wp_unslash( $this->slash_7 ), $comment->comment_content ); 54 54 55 $data = array(55 $data = array( 56 56 'comment_post_ID' => $post_id, 57 57 'comment_author' => $this->slash_2, … … 61 61 'comment_content' => $this->slash_4, 62 62 ); 63 $ id= wp_new_comment( $data );63 $comment_id = wp_new_comment( $data ); 64 64 65 $comment = get_comment( $ id );65 $comment = get_comment( $comment_id ); 66 66 67 67 $this->assertSame( wp_unslash( $this->slash_2 ), $comment->comment_author );
Note: See TracChangeset
for help on using the changeset viewer.