/usr/share/php/tests/PHP_Compat/tests/function/php_strip_whitespace.phpt is in php-compat 1.6.0a3-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | --TEST--
Function -- php_strip_whitespace
--SKIPIF--
<?php if (!extension_loaded('tokenizer')) { echo 'skip'; } ?>
--FILE--
<?php
require_once 'PHP/Compat/Function/php_strip_whitespace.php';
// Here is some sample PHP code to write to the file
$string = '<?php
// PHP comment here
/*
* Another PHP comment
*/
echo microtime();
// Newlines are considered whitespace, and are removed too:
microtime();
?>';
// Create a temp file
$tmpfname = tempnam('/tmp', 'phpcompat');
$fh = fopen($tmpfname, 'w');
fwrite($fh, $string);
// Test
echo php_compat_php_strip_whitespace($tmpfname);
// Close
fclose($fh);
?>
--EXPECT--
<?php
echo microtime(); microtime(); ?>
|