- Timestamp:
- 06/03/2024 07:45:57 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php
r57768 r58304 232 232 $processor = WP_HTML_Processor::create_fragment( $html ); 233 233 234 while ( $processor-> step() && null === $processor->get_attribute( 'supported' ) ) {234 while ( $processor->next_token() && null === $processor->get_attribute( 'supported' ) ) { 235 235 continue; 236 236 } 237 237 238 $this->assertNull( 239 $processor->get_last_error(), 240 'Bailed on unsupported input before finding supported checkpoint: check test code.' 241 ); 242 238 243 $this->assertTrue( $processor->get_attribute( 'supported' ), 'Did not find required supported element.' ); 239 $this->assertFalse( $processor->step(), "Didn't properly reject unsupported markup: {$description}" ); 244 $processor->next_token(); 245 $this->assertNotNull( $processor->get_last_error(), "Didn't properly reject unsupported markup: {$description}" ); 240 246 } 241 247 … … 248 254 return array( 249 255 'A with formatting following unclosed A' => array( 250 '<a><strong>Click < a supported><big unsupported>Here</big></a></strong></a>',256 '<a><strong>Click <span supported><a unsupported><big>Here</big></a></strong></a>', 251 257 'Unclosed formatting requires complicated reconstruction.', 252 258 ), … … 326 332 'EM inside DIV' => array( '<div>The weather is <em target>beautiful</em>.</div>', array( 'HTML', 'BODY', 'DIV', 'EM' ), 1 ), 327 333 'EM after closed EM' => array( '<em></em><em target></em>', array( 'HTML', 'BODY', 'EM' ), 2 ), 328 'EM after closed EMs' => array( '<em></em><em><em></em></em><em></em><em></em><em target></em>', array( 'HTML', 'BODY', 'EM' ), 6),334 'EM after closed EMs' => array( '<em></em><em><em></em></em><em></em><em></em><em target></em>', array( 'HTML', 'BODY', 'EM' ), 5 ), 329 335 'EM after unclosed EM' => array( '<em><em target></em>', array( 'HTML', 'BODY', 'EM', 'EM' ), 1 ), 330 336 'EM after unclosed EM after DIV' => array( '<em><div><em target>', array( 'HTML', 'BODY', 'EM', 'DIV', 'EM' ), 1 ),
Note: See TracChangeset
for help on using the changeset viewer.