Changeset 59224 for trunk/tests/phpunit/tests/customize/nav-menus.php
- Timestamp:
- 10/13/2024 07:07:06 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/nav-menus.php
r56548 r59224 770 770 foreach ( $post_types as $type ) { 771 771 $this->assertStringContainsString( 'available-menu-items-post_type-' . esc_attr( $type->name ), $template ); 772 $this->assertMatchesRegularExpression( '#<h4 class="accordion-section-title".*>\s* ' . esc_html( $type->labels->name ) . '#', $template );772 $this->assertMatchesRegularExpression( '#<h4 class="accordion-section-title".*>\s*<button type="button" class="accordion-trigger" aria-expanded="false" aria-controls=".*">\s*' . esc_html( $type->labels->name ) . '#', $template ); 773 773 $this->assertStringContainsString( 'data-type="post_type"', $template ); 774 774 $this->assertStringContainsString( 'data-object="' . esc_attr( $type->name ) . '"', $template ); … … 781 781 foreach ( $taxonomies as $tax ) { 782 782 $this->assertStringContainsString( 'available-menu-items-taxonomy-' . esc_attr( $tax->name ), $template ); 783 $this->assertMatchesRegularExpression( '#<h4 class="accordion-section-title".*>\s* ' . esc_html( $tax->labels->name ) . '#', $template );783 $this->assertMatchesRegularExpression( '#<h4 class="accordion-section-title".*>\s*<button type="button" class="accordion-trigger" aria-expanded="false" aria-controls=".*">\s*' . esc_html( $tax->labels->name ) . '#', $template ); 784 784 $this->assertStringContainsString( 'data-type="taxonomy"', $template ); 785 785 $this->assertStringContainsString( 'data-object="' . esc_attr( $tax->name ) . '"', $template ); … … 789 789 790 790 $this->assertStringContainsString( 'available-menu-items-custom_type', $template ); 791 $this->assertMatchesRegularExpression( '#<h4 class="accordion-section-title".*>\s* Custom#', $template );791 $this->assertMatchesRegularExpression( '#<h4 class="accordion-section-title".*>\s*<button type="button" class="accordion-trigger" aria-expanded="false" aria-controls=".*">\s*Custom#', $template ); 792 792 $this->assertStringContainsString( 'data-type="custom_type"', $template ); 793 793 $this->assertStringContainsString( 'data-object="custom_object"', $template );
Note: See TracChangeset
for help on using the changeset viewer.