diff options
author | Zoe Slattery <zoe@php.net> | 2009-08-26 17:17:58 +0000 |
---|---|---|
committer | Zoe Slattery <zoe@php.net> | 2009-08-26 17:17:58 +0000 |
commit | 7effcd5f6c1cc2b1851bd0d5ef1ee06d89ba438a (patch) | |
tree | 036937e1cdb922ef28574653165cf8969f3e9e7b /ext/standard/tests/strings/show_source_variation2.phpt | |
parent | 1a372313ca8e106b3816053ca9869282be01b6d1 (diff) | |
download | php-git-7effcd5f6c1cc2b1851bd0d5ef1ee06d89ba438a.tar.gz |
Test from 2009 testfest
Diffstat (limited to 'ext/standard/tests/strings/show_source_variation2.phpt')
-rw-r--r-- | ext/standard/tests/strings/show_source_variation2.phpt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/standard/tests/strings/show_source_variation2.phpt b/ext/standard/tests/strings/show_source_variation2.phpt new file mode 100644 index 0000000000..06ef66c2d2 --- /dev/null +++ b/ext/standard/tests/strings/show_source_variation2.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test function show_source() by calling it with its expected arguments and output to variable, more test for highlight_file() +--CREDITS-- +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- +<?php +echo "*** Test by calling method or function with its expected arguments and output to variable ***\n"; +$foo = 'bar'; +$baz = "something ".$foo."\n"; + +if ( $foo == 'bar' ) +{ + $baz = "baz\n"; +} + + /* some code here */ +$source = show_source(__FILE__, true); + +var_dump($source); +?> +--EXPECTF-- +*** Test by calling method or function with its expected arguments and output to variable *** +string(1987) "<code><span style="color: #000000"> +<span style="color: #0000BB"><?php<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"*** Test by calling method or function with its expected arguments and output to variable ***\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$foo </span><span style="color: #007700">= </span><span style="color: #DD0000">'bar'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$baz </span><span style="color: #007700">= </span><span style="color: #DD0000">"something "</span><span style="color: #007700">.</span><span style="color: #0000BB">$foo</span><span style="color: #007700">.</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br />if ( </span><span style="color: #0000BB">$foo </span><span style="color: #007700">== </span><span style="color: #DD0000">'bar' </span><span style="color: #007700">) <br />{<br /> </span><span style="color: #0000BB">$baz </span><span style="color: #007700">= </span><span style="color: #DD0000">"baz\n"</span><span style="color: #007700">;<br />}<br /><br /> </span><span style="color: #FF8000">/* some code here */ <br /></span><span style="color: #0000BB">$source </span><span style="color: #007700">= </span><span style="color: #0000BB">show_source</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">, </span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$source</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?><br /></span> +</span> +</code>" |