mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-06 06:07:26 +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)));
|
||||
}
|
||||
|
||||
|
@@ -5,8 +5,8 @@ chdir(dirname(__FILE__));
|
||||
require_once 'common.php';
|
||||
assertCli();
|
||||
|
||||
echo "Please do not run this script. It is here for historical purposes only.";
|
||||
exit;
|
||||
//echo "Please do not run this script. It is here for historical purposes only.";
|
||||
//exit;
|
||||
|
||||
/**
|
||||
* @file
|
||||
@@ -16,7 +16,7 @@ exit;
|
||||
* This does not remove inline includes; those must be handled manually.
|
||||
*/
|
||||
|
||||
chdir(dirname(__FILE__) . '/../library/');
|
||||
chdir(dirname(__FILE__) . '/../tests/HTMLPurifier');
|
||||
$FS = new FSTools();
|
||||
|
||||
$files = $FS->globr('.', '*.php');
|
||||
|
Reference in New Issue
Block a user