Make WordPress Core

Changeset 60816


Ignore:
Timestamp:
09/30/2025 04:35:20 PM (12 months ago)
Author:
johnbillion
Message:

Menus: Revert some unintentional whitespace changes introduced in r60815.

Unprops johnbillion.

Location:
trunk/tests/phpunit/tests/customize
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/customize/nav-menu-item-setting.php

    r60815 r60816  
    173173                        0,
    174174                        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',
    180180                        )
    181181                );
    … …  
    199199                        $other_menu_id,
    200200                        $item_id,
    201                                 array(
     201                        array(
    202202                                'menu-item-title' => 'Hola',
    203203                        )
  • trunk/tests/phpunit/tests/customize/nav-menus.php

    r60815 r60816  
    790790                $this->assertNotEmpty( $post_types );
    791791
    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 );
    798798                }
    799799
    … …  
    802802                $this->assertNotEmpty( $taxonomies );
    803803
    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 );
    810810                }
    811811
Note: See TracChangeset for help on using the changeset viewer.