Changeset 51565 for trunk/tests/phpunit/tests/customize/nav-menus.php
- Timestamp:
- 08/06/2021 09:52:06 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/nav-menus.php
r51462 r51565 771 771 foreach ( $post_types as $type ) { 772 772 $this->assertStringContainsString( 'available-menu-items-post_type-' . esc_attr( $type->name ), $template ); 773 $this->assert RegExp( '#<h4 class="accordion-section-title".*>\s*' . esc_html( $type->labels->name ) . '#', $template );773 $this->assertMatchesRegularExpression( '#<h4 class="accordion-section-title".*>\s*' . esc_html( $type->labels->name ) . '#', $template ); 774 774 $this->assertStringContainsString( 'data-type="post_type"', $template ); 775 775 $this->assertStringContainsString( 'data-object="' . esc_attr( $type->name ) . '"', $template ); … … 782 782 foreach ( $taxonomies as $tax ) { 783 783 $this->assertStringContainsString( 'available-menu-items-taxonomy-' . esc_attr( $tax->name ), $template ); 784 $this->assert RegExp( '#<h4 class="accordion-section-title".*>\s*' . esc_html( $tax->labels->name ) . '#', $template );784 $this->assertMatchesRegularExpression( '#<h4 class="accordion-section-title".*>\s*' . esc_html( $tax->labels->name ) . '#', $template ); 785 785 $this->assertStringContainsString( 'data-type="taxonomy"', $template ); 786 786 $this->assertStringContainsString( 'data-object="' . esc_attr( $tax->name ) . '"', $template ); … … 790 790 791 791 $this->assertStringContainsString( 'available-menu-items-custom_type', $template ); 792 $this->assert RegExp( '#<h4 class="accordion-section-title".*>\s*Custom#', $template );792 $this->assertMatchesRegularExpression( '#<h4 class="accordion-section-title".*>\s*Custom#', $template ); 793 793 $this->assertStringContainsString( 'data-type="custom_type"', $template ); 794 794 $this->assertStringContainsString( 'data-object="custom_object"', $template ); … … 1014 1014 foreach ( $drafted_post_ids as $post_id ) { 1015 1015 $this->assertSame( 'publish', get_post_status( $post_id ) ); 1016 $this->assert RegExp( '/^auto-draft-\d+$/', get_post( $post_id )->post_name );1016 $this->assertMatchesRegularExpression( '/^auto-draft-\d+$/', get_post( $post_id )->post_name ); 1017 1017 $this->assertEmpty( get_post_meta( $post_id, '_customize_draft_post_name', true ) ); 1018 1018 }
Note: See TracChangeset
for help on using the changeset viewer.