mirror of
https://github.com/php/php-src.git
synced 2024-10-18 15:02:38 +00:00
28 lines
2.1 KiB
Plaintext
28 lines
2.1 KiB
Plaintext
|
--TEST--
|
||
|
Test function show_source() by calling it with its expected arguments, 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 ***\n";
|
||
|
$foo = 'bar';
|
||
|
$baz = "something ".$foo."\n";
|
||
|
|
||
|
if ( $foo == 'bar' )
|
||
|
{
|
||
|
$baz = 'baz';
|
||
|
}
|
||
|
|
||
|
/* some code here */
|
||
|
|
||
|
show_source(__FILE__);
|
||
|
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
*** Test by calling method or function with its expected arguments ***
|
||
|
<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 ***\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'</span><span style="color: #007700">;<br />}<br /><br /> </span><span style="color: #FF8000">/* some code here */<br /> <br /></span><span style="color: #0000BB">show_source</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?><br /></span>
|
||
|
</span>
|
||
|
</code>
|