Changeset 63380 for trunk/tests/phpunit/tests/functions/wpAdminNotice.php
- Timestamp:
- 08/28/2026 12:04:49 AM (7 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions/wpAdminNotice.php
r57100 r63380 26 26 $actual = ob_get_clean(); 27 27 28 $this->assert Same( $expected, $actual );28 $this->assertEqualHTML( $expected, $actual ); 29 29 } 30 30 … … 155 155 'type' => '"><script>alert("Howdy,admin!");</script>', 156 156 ), 157 'expected' => '<div class="notice notice- ">alert("Howdy,admin!");"><p>A notice with an unsafe type.</p></div>',157 'expected' => '<div class="notice notice-"><script>alert("Howdy,admin!");</script>"><p>A notice with an unsafe type.</p></div>', 158 158 ), 159 159 'an unsafe ID' => array( … … 162 162 'id' => '"><script>alert( "Howdy, admin!" );</script> <div class="notice', 163 163 ), 164 'expected' => '<div id=" ">alert( "Howdy, admin!" ); <divclass="notice"><p>A notice with an unsafe ID.</p></div>',164 'expected' => '<div id=""><script>alert( "Howdy, admin!" );</script> <div class="notice" class="notice"><p>A notice with an unsafe ID.</p></div>', 165 165 ), 166 166 'unsafe additional classes' => array( … … 169 169 'additional_classes' => array( '"><script>alert( "Howdy, admin!" );</script> <div class="notice' ), 170 170 ), 171 'expected' => '<div class="notice ">alert( "Howdy, admin!" ); <div class="notice"><p>A notice with unsafe additional classes.</p></div>',171 'expected' => '<div class="notice "><script>alert( "Howdy, admin!" );</script> <div class="notice"><p>A notice with unsafe additional classes.</p></div>', 172 172 ), 173 173 'a type that is not a string' => array(
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)