Changeset 56748 for trunk/tests/phpunit/tests/dependencies/scripts.php
- Timestamp:
- 09/29/2023 07:45:53 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/dependencies/scripts.php
r56687 r56748 261 261 wp_enqueue_script( 'dependent-script-a3', '/dependent-script-a3.js', array( 'main-script-a3' ), null ); 262 262 $output = get_echo( 'wp_print_scripts' ); 263 $expected = str_replace( "'", '"', "<script type='text/javascript' src='/main-script-a3.js' id='main-script-a3-js' data-wp-strategy='{$strategy}'></script>" ); 264 $this->assertStringContainsString( $expected, $output, 'Blocking dependents must force delayed dependencies to become blocking.' ); 263 $expected = <<<JS 264 <script type='text/javascript' src='/main-script-a3.js' id='main-script-a3-js' data-wp-strategy='{$strategy}'></script> 265 <script id="dependent-script-a3-js" src="/dependent-script-a3.js" type="text/javascript"></script> 266 JS; 267 $this->assertEqualMarkup( $expected, $output, 'Blocking dependents must force delayed dependencies to become blocking.' ); 265 268 } 266 269 … … 2998 3001 } 2999 3002 3003 // Normalize other whitespace nodes. 3004 $xpath = new DOMXPath( $dom ); 3005 foreach ( $xpath->query( '//text()' ) as $node ) { 3006 /** @var DOMText $node */ 3007 if ( preg_match( '/^\s+$/', $node->nodeValue ) ) { 3008 $node->nodeValue = ' '; 3009 } 3010 } 3011 3000 3012 return $dom; 3001 3013 }
Note: See TracChangeset
for help on using the changeset viewer.