Make WordPress Core


Ignore:
Timestamp:
01/26/2026 01:21:56 PM (10 months ago)
Author:
jonsurrell
Message:

Build/Test Tools: Clean obsolete non-HTML5 tests.

Support for non-HTML5 scripts was removed in [61415]. Removes obsolete tests and references to the non-HTML5 script behaviors including CDATA wrappers and type attributes.

Developed in ​https://github.com/WordPress/wordpress-develop/pull/10740.

Follow-up to [61415].

Props jonsurrell, westonruter, mukesh27.
Fixes #64442.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/dependencies/wpScriptTag.php

    r61482 r61526  
    1010
    1111        public function get_script_tag_type_set() {
    12                 add_theme_support( 'html5', array( 'script' ) );
    13 
    1412                $this->assertEqualHTML(
    1513                        '<script src="https://localhost/PATH/FILE.js" type="application/javascript" nomodule></script>' . "\n",
    … …  
    2321                        )
    2422                );
    25 
    26                 remove_theme_support( 'html5' );
    27 
    28                 $this->assertEqualHTML(
    29                         '<script src="https://localhost/PATH/FILE.js" type="application/javascript" nomodule></script>' . "\n",
    30                         wp_get_script_tag(
    31                                 array(
    32                                         'src'      => 'https://localhost/PATH/FILE.js',
    33                                         'type'     => 'application/javascript',
    34                                         'async'    => false,
    35                                         'nomodule' => true,
    36                                 )
    37                         )
    38                 );
    3923        }
    4024
    … …  
    4327         */
    4428        public function test_get_script_tag_type_not_set() {
    45                 add_theme_support( 'html5', array( 'script' ) );
    46 
    4729                $this->assertEqualHTML(
    4830                        '<script src="https://localhost/PATH/FILE.js" nomodule></script>' . "\n",
    … …  
    5537                        )
    5638                );
    57 
    58                 remove_theme_support( 'html5' );
    5939        }
    6040
    … …  
    7353                );
    7454
    75                 add_theme_support( 'html5', array( 'script' ) );
    76 
    7755                $attributes = array(
    7856                        'src'      => 'https://localhost/PATH/FILE.js',
    … …  
    8058                        'nomodule' => true,
    8159                );
    82 
    83                 $this->assertEqualHTML(
    84                         wp_get_script_tag( $attributes ),
    85                         get_echo(
    86                                 'wp_print_script_tag',
    87                                 array( $attributes )
    88                         )
    89                 );
    90 
    91                 remove_theme_support( 'html5' );
    9260
    9361                $this->assertEqualHTML(
Note: See TracChangeset for help on using the changeset viewer.