File tree Expand file tree Collapse file tree
tests/phpunit/tests/html-api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,14 +70,14 @@ public function test_replaces_only_in_first_duplicate_attribute() {
7070 * @covers ::render
7171 */
7272 public function test_attribute_replacement_is_not_recursive () {
73- $ template_string = '<meta a="</% replace>"> ' ;
73+ $ template_string = '<div a="<%/ replace>"><%/replace></div > ' ;
7474 $ replacements = array (
7575 'replace ' => '<%/replace> ' ,
7676 );
7777
7878 $ result = T::from ( $ template_string )->bind ( $ replacements )->render ();
7979
80- $ expected = '<meta a="<%/ replace>"> ' ;
80+ $ expected = '<div a="</% replace>"></%replace></div > ' ;
8181 $ this ->assertEqualHTML ( $ expected , $ result );
8282 }
8383
@@ -754,6 +754,12 @@ public static function data_pre_element_leading_newline() {
754754 array ( 'code ' => "\nline1 \nline2 " ),
755755 "<pre> \n\nline1 \nline2</pre> " ,
756756 ),
757+
758+ 'PRE with newline, newline replacement, and additional contents ' => array (
759+ "<pre> \n</%code><!--c--></pre> " ,
760+ array ( 'code ' => "\nline1 " ),
761+ "<pre> \n\nline1<!--c--></pre> " ,
762+ ),
757763 );
758764 }
759765
You can’t perform that action at this time.
0 commit comments