- Timestamp:
- 10/01/2025 12:57:19 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php
r60649 r60887 71 71 $this->assertFalse( $processor->has_self_closing_flag(), 'Found the self-closing tag when it was absent.' ); 72 72 } 73 } 74 75 /** 76 * @ticket 63854 77 * 78 * @covers WP_HTML_Tag_Processor::__construct 79 * @expectedIncorrectUsage WP_HTML_Tag_Processor::__construct 80 */ 81 public function test_constructor_validates_html_parameter() { 82 // Test that passing null triggers _doing_it_wrong and sets HTML to empty string. 83 $processor = new WP_HTML_Tag_Processor( null ); 84 85 // Verify that the HTML was set to an empty string. 86 $this->assertSame( '', $processor->get_updated_html(), 'HTML should be set to empty string when null is passed' ); 87 88 // Verify that next_token() works without errors (indicating the processor is in a valid state). 89 $this->assertFalse( $processor->next_token(), 'next_token() should work without errors when HTML is empty string' ); 73 90 } 74 91
Note: See TracChangeset
for help on using the changeset viewer.