Skip to content

Commit 7ad71ed

Browse files
committed
- Add highlight_string buffering test
1 parent 9f8b57f commit 7ad71ed

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

tests/strings/004.phpt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--TEST--
2+
highlight_string() buffering
3+
--POST--
4+
--GET--
5+
--FILE--
6+
<?php
7+
$var = highlight_string("<br /><?php echo \"foo\"; ?><br />");
8+
$var = highlight_string("<br /><?php echo \"bar\"; ?><br />", TRUE);
9+
echo "\n[$var]\n";
10+
?>
11+
--EXPECT--
12+
<code><font color="#000000">
13+
&lt;br /&gt;<font color="#0000BB">&lt;?php </font><font color="#007700">echo </font><font color="#DD0000">"foo"</font><font color="#007700">; </font><font color="#0000BB">?&gt;</font>&lt;br /&gt;</font>
14+
</code>
15+
[<code><font color="#000000">
16+
&lt;br /&gt;<font color="#0000BB">&lt;?php </font><font color="#007700">echo </font><font color="#DD0000">"bar"</font><font color="#007700">; </font><font color="#0000BB">?&gt;</font>&lt;br /&gt;</font>
17+
</code>]

0 commit comments

Comments
 (0)