Changeset 60816
- Timestamp:
- 09/30/2025 04:35:20 PM (8 weeks ago)
- Location:
- trunk/tests/phpunit/tests/customize
- Files:
-
- 2 edited
-
nav-menu-item-setting.php (modified) (2 diffs)
-
nav-menus.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/nav-menu-item-setting.php
r60815 r60816 173 173 0, 174 174 array( 175 'menu-item-type' => 'post_type',176 'menu-item-object' => 'post',177 'menu-item-object-id' => $post_id,178 'menu-item-title' => $item_title,179 'menu-item-status' => 'publish',175 'menu-item-type' => 'post_type', 176 'menu-item-object' => 'post', 177 'menu-item-object-id' => $post_id, 178 'menu-item-title' => $item_title, 179 'menu-item-status' => 'publish', 180 180 ) 181 181 ); … … 199 199 $other_menu_id, 200 200 $item_id, 201 array(201 array( 202 202 'menu-item-title' => 'Hola', 203 203 ) -
trunk/tests/phpunit/tests/customize/nav-menus.php
r60815 r60816 790 790 $this->assertNotEmpty( $post_types ); 791 791 792 foreach ( $post_types as $type ) {793 $this->assertStringContainsString( 'available-menu-items-post_type-' . esc_attr( $type->name ), $template );794 $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 );795 $this->assertStringContainsString( 'data-type="post_type"', $template );796 $this->assertStringContainsString( 'data-object="' . esc_attr( $type->name ) . '"', $template );797 $this->assertStringContainsString( 'data-type_label="' . esc_attr( $type->labels->singular_name ) . '"', $template );792 foreach ( $post_types as $type ) { 793 $this->assertStringContainsString( 'available-menu-items-post_type-' . esc_attr( $type->name ), $template ); 794 $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 ); 795 $this->assertStringContainsString( 'data-type="post_type"', $template ); 796 $this->assertStringContainsString( 'data-object="' . esc_attr( $type->name ) . '"', $template ); 797 $this->assertStringContainsString( 'data-type_label="' . esc_attr( $type->labels->singular_name ) . '"', $template ); 798 798 } 799 799 … … 802 802 $this->assertNotEmpty( $taxonomies ); 803 803 804 foreach ( $taxonomies as $tax ) {805 $this->assertStringContainsString( 'available-menu-items-taxonomy-' . esc_attr( $tax->name ), $template );806 $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 );807 $this->assertStringContainsString( 'data-type="taxonomy"', $template );808 $this->assertStringContainsString( 'data-object="' . esc_attr( $tax->name ) . '"', $template );809 $this->assertStringContainsString( 'data-type_label="' . esc_attr( $tax->labels->singular_name ) . '"', $template );804 foreach ( $taxonomies as $tax ) { 805 $this->assertStringContainsString( 'available-menu-items-taxonomy-' . esc_attr( $tax->name ), $template ); 806 $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 ); 807 $this->assertStringContainsString( 'data-type="taxonomy"', $template ); 808 $this->assertStringContainsString( 'data-object="' . esc_attr( $tax->name ) . '"', $template ); 809 $this->assertStringContainsString( 'data-type_label="' . esc_attr( $tax->labels->singular_name ) . '"', $template ); 810 810 } 811 811
Note: See TracChangeset
for help on using the changeset viewer.