Changeset 34668 for trunk/tests/phpunit/tests/post/slashes.php
- Timestamp:
- 09/28/2015 07:25:05 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/slashes.php
r31065 r34668 130 130 } 131 131 132 /** 133 * @ticket 27550 134 */ 135 function test_wp_trash_untrash() { 136 $post = array( 137 'post_title' => $this->slash_1, 138 'post_content' => $this->slash_3, 139 'post_excerpt' => $this->slash_5, 140 ); 141 $id = wp_insert_post( wp_slash( $post ) ); 142 143 $trashed = wp_trash_post( $id ); 144 $this->assertNotEmpty( $trashed ); 145 146 $post = get_post( $id ); 147 148 $this->assertEquals( $this->slash_1, $post->post_title ); 149 $this->assertEquals( $this->slash_3, $post->post_content ); 150 $this->assertEquals( $this->slash_5, $post->post_excerpt ); 151 152 $untrashed = wp_untrash_post( $id ); 153 $this->assertNotEmpty( $untrashed ); 154 155 $post = get_post( $id ); 156 157 $this->assertEquals( $this->slash_1, $post->post_title ); 158 $this->assertEquals( $this->slash_3, $post->post_content ); 159 $this->assertEquals( $this->slash_5, $post->post_excerpt ); 160 } 132 161 }
Note: See TracChangeset
for help on using the changeset viewer.