0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-22 16:31:53 +00:00

[2.1.1] Single test methods can be invoked by prefixing them with __only

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1363 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2007-08-04 14:51:06 +00:00
parent 7b64bc37e2
commit 79c18eb781
3 changed files with 12 additions and 1 deletions

1
NEWS
View File

@ -16,6 +16,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
- Fix show-stopper bug in %URI.MakeAbsolute functionality - Fix show-stopper bug in %URI.MakeAbsolute functionality
. Add prefix directory to include path for standalone, this prevents . Add prefix directory to include path for standalone, this prevents
other installations from clobbering the standalone's URI schemes other installations from clobbering the standalone's URI schemes
. Single test methods can be invoked by prefixing with __only
2.1.0, released 2007-08-02 2.1.0, released 2007-08-02
# flush-htmldefinition-cache.php superseded in favor of a generic # flush-htmldefinition-cache.php superseded in favor of a generic

View File

@ -55,5 +55,15 @@ class HTMLPurifier_Harness extends UnitTestCase
} }
} }
function getTests() {
// __onlytest makes only one test get triggered
foreach (get_class_methods(get_class($this)) as $method) {
if (strtolower(substr($method, 0, 10)) == '__onlytest') {
return array($method);
}
}
return parent::getTests();
}
} }

View File

@ -4,7 +4,7 @@ require_once 'HTMLPurifier.php';
// integration test // integration test
class HTMLPurifierTest extends UnitTestCase class HTMLPurifierTest extends HTMLPurifier_Harness
{ {
var $purifier; var $purifier;