- Timestamp:
- 08/28/2026 12:04:49 AM (6 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions/wpGetAdminNotice.php
r57100 r63380 22 22 */ 23 23 public function test_should_return_admin_notice( $message, $args, $expected ) { 24 $this->assert Same( $expected, wp_get_admin_notice( $message, $args ) );24 $this->assertEqualHTML( $expected, wp_get_admin_notice( $message, $args ) ); 25 25 } 26 26 … … 151 151 'type' => '"><script>alert("Howdy,admin!");</script>', 152 152 ), 153 'expected' => '<div class="notice notice- "><script>alert("Howdy,admin!");</script>"><p>A notice with an unsafe type.</p></div>',153 'expected' => '<div class="notice notice-"><script>alert("Howdy,admin!");</script>"><p>A notice with an unsafe type.</p></div>', 154 154 ), 155 155 'an unsafe ID' => array( … … 158 158 'id' => '"><script>alert( "Howdy, admin!" );</script> <div class="notice', 159 159 ), 160 'expected' => '<div id=" "><script>alert( "Howdy, admin!" );</script> <div class="notice" class="notice"><p>A notice with an unsafe ID.</p></div>',160 'expected' => '<div id=""><script>alert( "Howdy, admin!" );</script> <div class="notice" class="notice"><p>A notice with an unsafe ID.</p></div>', 161 161 ), 162 162 'unsafe additional classes' => array( … … 165 165 'additional_classes' => array( '"><script>alert( "Howdy, admin!" );</script> <div class="notice' ), 166 166 ), 167 'expected' => '<div class="notice "><script>alert( "Howdy, admin!" );</script> <div class="notice"><p>A notice with unsafe additional classes.</p></div>',167 'expected' => '<div class="notice "><script>alert( "Howdy, admin!" );</script> <div class="notice"><p>A notice with unsafe additional classes.</p></div>', 168 168 ), 169 169 '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)