Changeset 55588 for trunk/tests/phpunit/tests/post/getPages.php
- Timestamp:
- 03/24/2023 02:58:39 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/getPages.php
r55583 r55588 741 741 } 742 742 743 public function test_wp_list_pages_classes() {744 $type = 'taco';745 register_post_type(746 $type,747 array(748 'hierarchical' => true,749 'public' => true,750 )751 );752 753 $posts = self::factory()->post->create_many( 2, array( 'post_type' => $type ) );754 $post_id = reset( $posts );755 756 $this->go_to( "/?p=$post_id&post_type=$type" );757 758 $this->assertSame( $post_id, get_queried_object_id() );759 760 $output = wp_list_pages(761 array(762 'echo' => false,763 'title_li' => '',764 'post_type' => $type,765 )766 );767 768 $this->assertNotEmpty( $output );769 $this->assertSame( 2, substr_count( $output, 'class="page_item ' ) );770 $this->assertStringContainsString( 'current_page_item', $output );771 $this->assertSame( 1, substr_count( $output, 'current_page_item' ) );772 773 _unregister_post_type( $type );774 }775 776 743 /** 777 744 * @ticket 12821
Note: See TracChangeset
for help on using the changeset viewer.