Changeset 60906 for trunk/tests/phpunit/tests/post/wpInsertPost.php
- Timestamp:
- 10/06/2025 08:11:21 PM (2 months ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/post/wpInsertPost.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/wpInsertPost.php
r57680 r60906 567 567 568 568 /** 569 * "When I delete a future post using wp_delete_post( $post->ID ) it does not update the cron correctly."570 *571 * @ticket 5364572 * @covers ::wp_delete_post573 */574 public function test_delete_future_post_cron() {575 $future_date = strtotime( '+1 day' );576 577 $data = array(578 'post_status' => 'publish',579 'post_content' => 'content',580 'post_title' => 'title',581 'post_date' => date_format( date_create( "@{$future_date}" ), 'Y-m-d H:i:s' ),582 );583 584 // Insert a post and make sure the ID is OK.585 $post_id = wp_insert_post( $data );586 587 // Check that there's a publish_future_post job scheduled at the right time.588 $this->assertSame( $future_date, $this->next_schedule_for_post( 'publish_future_post', $post_id ) );589 590 // Now delete the post and make sure the cron entry is removed.591 wp_delete_post( $post_id );592 593 $this->assertFalse( $this->next_schedule_for_post( 'publish_future_post', $post_id ) );594 }595 596 /**597 569 * Bug: permalink doesn't work if post title is empty. 598 570 *
Note: See TracChangeset
for help on using the changeset viewer.