mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-09 15:28:40 +00:00
[3.1.0] Get testing working again for all versions
- Standalone testing setup properly with autoload - Bootstrap autoloader deals more robustly with classes that don't exist, preventing class_exists($class, true) from barfing. - Cleanup $_reporter to $reporter git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1727 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
ef6a1c9274
commit
0bef016271
3
NEWS
3
NEWS
@ -34,6 +34,8 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
|
||||
! %HTML.Allowed deals gracefully with whitespace anywhere, anytime!
|
||||
! HTML Purifier's URI handling is a lot more robust, with much stricter
|
||||
validation checks and better percent encoding handling.
|
||||
! Bootstrap autoloader deals more robustly with classes that don't exist,
|
||||
preventing class_exists($class, true) from barfing.
|
||||
- InterchangeBuilder now alphabetizes its lists
|
||||
- Validation error in configdoc output fixed
|
||||
- Iconv and other encoding errors muted even with custom error handlers that
|
||||
@ -50,6 +52,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
|
||||
- Fatal error with unserialization of ScriptRequired
|
||||
- Created directories are now chmod'ed properly
|
||||
- Fixed bug with fallback languages in LanguageFactory
|
||||
- Standalone testing setup properly with autoload
|
||||
. Out-of-date documentation revised
|
||||
. UTF-8 encoding check optimization as suggested by Diego
|
||||
. HTMLPurifier_Error removed in favor of exceptions
|
||||
|
@ -172,7 +172,7 @@
|
||||
</directive>
|
||||
<directive id="Core.Language">
|
||||
<file name="HTMLPurifier/LanguageFactory.php">
|
||||
<line>85</line>
|
||||
<line>88</line>
|
||||
</file>
|
||||
</directive>
|
||||
<directive id="Core.LexerImpl">
|
||||
|
@ -37,7 +37,7 @@ class HTMLPurifier_Bootstrap
|
||||
public static function autoload($class) {
|
||||
$file = HTMLPurifier_Bootstrap::getPath($class);
|
||||
if (!$file) return false;
|
||||
require $file;
|
||||
require HTMLPURIFIER_PREFIX . '/' . $file;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -49,10 +49,12 @@ class HTMLPurifier_Bootstrap
|
||||
// Custom implementations
|
||||
if (strncmp('HTMLPurifier_Language_', $class, 22) === 0) {
|
||||
$code = str_replace('_', '-', substr($class, 22));
|
||||
return 'HTMLPurifier/Language/classes/' . $code . '.php';
|
||||
$file = 'HTMLPurifier/Language/classes/' . $code . '.php';
|
||||
} else {
|
||||
$file = str_replace('_', '/', $class) . '.php';
|
||||
}
|
||||
// Standard implementation
|
||||
return str_replace('_', '/', $class) . '.php';
|
||||
if (!file_exists(HTMLPURIFIER_PREFIX . '/' . $file)) return false;
|
||||
return $file;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -193,7 +193,7 @@ class FailedTest extends UnitTestCase {
|
||||
}
|
||||
public function test() {
|
||||
$this->fail($this->msg);
|
||||
if ($this->details) $this->_reporter->paintFormattedMessage($this->details);
|
||||
if ($this->details) $this->reporter->paintFormattedMessage($this->details);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,8 +85,8 @@ if ($AC['standalone']) {
|
||||
} else {
|
||||
require '../library/HTMLPurifier.path.php';
|
||||
require 'HTMLPurifier.includes.php';
|
||||
require '../library/HTMLPurifier.autoload.php';
|
||||
}
|
||||
require '../library/HTMLPurifier.autoload.php';
|
||||
require 'HTMLPurifier/Harness.php';
|
||||
|
||||
// Now, userland code begins to be executed
|
||||
|
Loading…
Reference in New Issue
Block a user