File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
tests/phpunit/tests/dependencies Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,20 @@ public function tear_down() {
6969 parent ::tear_down ();
7070 }
7171
72+ /**
73+ * Asserts that two HTML SCRIPT tags are semantically equal within a larger HTML text.
74+ *
75+ * The expected string should contain a single SCRIPT tag with an ID attribute. This ID will
76+ * be used to locate the corresponding SCRIPT tag within the provided HTML.
77+ *
78+ * The provided HTML will be traversed to locate the SCRIPT tag with the matcing ID.
79+ *
80+ * These two tags will be compared for semantic equality of their HTML.
81+ *
82+ * @param string $expected The expected SCRIPT tag HTML.
83+ * @param string $html The HTML to search within.
84+ * @param string $message Optional. Message to display upon failure. Default 'The SCRIPT tag did not match.'.
85+ */
7286 private function assertEqualHTMLScriptTagById ( string $ expected , string $ html , string $ message = 'The SCRIPT tag did not match. ' ) {
7387 $ find_id_tag_processor = new WP_HTML_Tag_Processor ( $ expected );
7488 $ find_id_tag_processor ->next_token ();
You can’t perform that action at this time.
0 commit comments