Changeset 60906 for trunk/tests/phpunit/tests/post.php
- Timestamp:
- 10/06/2025 08:11:21 PM (2 months ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/post.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post.php
r60792 r60906 503 503 } 504 504 505 public function test_wp_delete_post_reassign_hierarchical_post_type() {506 $grandparent_page_id = self::factory()->post->create( array( 'post_type' => 'page' ) );507 $parent_page_id = self::factory()->post->create(508 array(509 'post_type' => 'page',510 'post_parent' => $grandparent_page_id,511 )512 );513 $page_id = self::factory()->post->create(514 array(515 'post_type' => 'page',516 'post_parent' => $parent_page_id,517 )518 );519 520 $this->assertSame( $parent_page_id, get_post( $page_id )->post_parent );521 522 wp_delete_post( $parent_page_id, true );523 $this->assertSame( $grandparent_page_id, get_post( $page_id )->post_parent );524 525 wp_delete_post( $grandparent_page_id, true );526 $this->assertSame( 0, get_post( $page_id )->post_parent );527 }528 529 505 /** 530 506 * Test ensuring that the post_slug can be filtered with a custom value short circuiting the built in
Note: See TracChangeset
for help on using the changeset viewer.