Changes from branches/4.0/tests/phpunit/tests/query/results.php at r30260 to trunk/tests/phpunit/tests/query/results.php at r28809
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/query/results.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/results.php
r30260 r28809 652 652 } 653 653 654 /**655 * @ticket 29615656 */657 function test_child_post_in_hierarchical_post_type_with_default_permalinks() {658 global $wp_rewrite;659 660 $old_permastruct = get_option( 'permalink_structure' );661 $wp_rewrite->set_permalink_structure( '' );662 $wp_rewrite->flush_rules();663 664 register_post_type( 'handbook', array( 'hierarchical' => true ) );665 666 $post_1 = $this->factory->post->create( array( 'post_title' => 'Contributing to the WordPress Codex', 'post_type' => 'handbook' ) );667 $post_2 = $this->factory->post->create( array( 'post_title' => 'Getting Started', 'post_parent' => $post_1, 'post_type' => 'handbook' ) );668 669 $this->assertContains( 'contributing-to-the-wordpress-codex/getting-started', get_permalink( $post_2 ) );670 671 $result = $this->q->query( array( 'handbook' => 'contributing-to-the-wordpress-codex/getting-started', 'post_type' => 'handbook' ) );672 $this->assertCount( 1, $result );673 674 $wp_rewrite->set_permalink_structure( $old_permastruct );675 $wp_rewrite->flush_rules();676 }677 678 654 }
Note: See TracChangeset
for help on using the changeset viewer.