mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-07 06:36:44 +02:00
Remove includes from unit tests.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1569 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -58,21 +58,6 @@ function remove_php_tags($text) {
|
||||
return substr($text, 5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an appropriate blank file, recursively generating directories
|
||||
* if necessary
|
||||
* @param string $file Filename to create blank for
|
||||
*/
|
||||
function create_blank($file) {
|
||||
global $FS;
|
||||
$dir = dirname($file);
|
||||
$base = realpath('../tests/blanks/') . DIRECTORY_SEPARATOR ;
|
||||
if ($dir != '.') {
|
||||
$FS->mkdirr($base . $dir);
|
||||
}
|
||||
file_put_contents($base . $file, '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the contents of a directory to the standalone directory
|
||||
* @param string $dir Directory to copy
|
||||
@@ -120,7 +105,6 @@ function replace_includes_callback($matches) {
|
||||
}
|
||||
if (isset($GLOBALS['loaded'][$file])) return '';
|
||||
$GLOBALS['loaded'][$file] = true;
|
||||
create_blank($file);
|
||||
return replace_includes(remove_php_tags(file_get_contents($file)));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user