diff --git a/phpunit/html/WP_HTML_Tag_Processor_Isolated_Test.php b/phpunit/html/WP_HTML_Tag_Processor_Isolated_Test.php deleted file mode 100644 index d593c5d2f4fe9..0000000000000 --- a/phpunit/html/WP_HTML_Tag_Processor_Isolated_Test.php +++ /dev/null @@ -1,145 +0,0 @@ -' ); - - $this->expectException( Exception::class ); - - $p->next_tag(); - $p->set_attribute( $attribute_name, 'test' ); - - $this->assertEquals( '', (string) $p ); - } - - /** - * Attribute names with invalid characters should be rejected. - * - * When WP_DEBUG isn't set we want to quietly fail to set the - * invalid attribute to avoid breaking the HTML and to do so - * without breaking the entire page. - * - * @dataProvider data_invalid_attribute_names - * @covers set_attribute - */ - public function test_set_attribute_silently_fails_when_given_invalid_attribute_names_outside_of_debug_mode( $attribute_name ) { - $p = new WP_HTML_Tag_Processor( '' ); - - $p->next_tag(); - $p->set_attribute( $attribute_name, 'test' ); - - $this->assertEquals( '', (string) $p ); - } - - /** - * Data provider with invalid HTML attribute names. - * - * @return array { - * @type string $attribute_name Text considered invalid for HTML attribute names. - * } - */ - public function data_invalid_attribute_names() { - return array( - 'controls_null' => array( "i\x00d" ), - 'controls_newline' => array( "\nbroken-expectations" ), - 'space' => array( 'aria label' ), - 'double-quote' => array( '"id"' ), - 'single-quote' => array( "'id'" ), - 'greater-than' => array( 'sneaky>script' ), - 'solidus' => array( 'data/test-id' ), - 'equals' => array( 'checked=checked' ), - 'noncharacters_1' => array( html_entity_decode( 'anything' ) ), - 'noncharacters_2' => array( html_entity_decode( 'test' ) ), - 'noncharacters_3' => array( html_entity_decode( 'test' ) ), - 'noncharacters_4' => array( html_entity_decode( 'test' ) ), - 'noncharacters_5' => array( html_entity_decode( '' ) ), - 'wp_no_lt' => array( 'id
', - ); - - $examples['Simple uppercase script tag'] = array( - '', - ); - - $examples['Script with a comment opener inside should end at the next script tag closer (dash dash escaped state)'] = array( - '-->', - ); - - $examples['Script with a comment opener and a script tag opener inside should end two script tag closer later (double escaped state)'] = array( - '