0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-09-18 18:25:18 +00:00

[2.1.1] Add prefix directory to include path in standalone: this prevents PEAR from clobbering our unit tests

- Add missing include to unit test harness
- Add missing unit test for HTMLPurifier::getInstance

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1358 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2007-08-03 15:11:08 +00:00
parent 350d8301dd
commit b3aa5fa0dc
4 changed files with 16 additions and 1 deletions

7
NEWS
View File

@ -9,6 +9,13 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
. Internal change
==========================
2.2.0, unknown release date
[ no items ]
2.1.1, unknown release date
. Add prefix directory to include path for standalone, this prevents
other installations from clobbering the standalone's URI schemes
2.1.0, released 2007-08-02
# flush-htmldefinition-cache.php superseded in favor of a generic
flush-definition-cache.php script, you can clear a specific cache

View File

@ -180,7 +180,8 @@ echo 'Creating full file...';
$contents = replace_includes(file_get_contents('HTMLPurifier.php'));
$contents = str_replace(
"define('HTMLPURIFIER_PREFIX', dirname(__FILE__));",
"define('HTMLPURIFIER_PREFIX', dirname(__FILE__) . '/standalone');",
"define('HTMLPURIFIER_PREFIX', dirname(__FILE__) . '/standalone');
set_include_path(HTMLPURIFIER_PREFIX . PATH_SEPARATOR . get_include_path());",
$contents
);
file_put_contents('HTMLPurifier.standalone.php', $contents);

View File

@ -1,6 +1,7 @@
<?php
require_once 'HTMLPurifier/URI.php';
require_once 'HTMLPurifier/URIHarness.php';
require_once 'HTMLPurifier/URIScheme.php';
require_once 'HTMLPurifier/URISchemeRegistry.php';

View File

@ -132,5 +132,11 @@ alert("<This is compatible with XHTML>");
);
}
function testGetInstance() {
$purifier = HTMLPurifier::getInstance();
$purifier2 = HTMLPurifier::getInstance();
$this->assertReference($purifier, $purifier2);
}
}