Changeset 41187 for trunk/tests/phpunit/tests/admin/includesPost.php
- Timestamp:
- 07/30/2017 02:40:42 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesPost.php
r39062 r41187 208 208 * @ticket 27792 209 209 */ 210 function test_bulk_edit_posts_stomping() {210 public function test_bulk_edit_posts_stomping() { 211 211 wp_set_current_user( self::$admin_id ); 212 212 … … 243 243 $this->assertEquals( 'closed', $post->comment_status ); 244 244 $this->assertEquals( 'closed', $post->ping_status ); 245 } 246 247 /** 248 * @ticket 41396 249 */ 250 public function test_bulk_edit_posts_should_set_post_format_before_wp_update_post_runs() { 251 wp_set_current_user( self::$admin_id ); 252 253 $request = array( 254 'post_format' => 'aside', 255 '_status' => -1, 256 'post' => array( self::$post_id ), 257 ); 258 259 add_action( 'save_post', array( $this, 'check_post_format' ) ); 260 261 bulk_edit_posts( $request ); 262 263 remove_action( 'save_post', array( $this, 'check_post_format' ) ); 264 } 265 266 public function check_post_format( $post_id ) { 267 if ( self::$post_id === $post_id ) { 268 $this->assertEquals( 'aside', get_post_format( $post_id ) ); 269 } 245 270 } 246 271
Note: See TracChangeset
for help on using the changeset viewer.