mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-08 06:48:42 +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:
parent
7b64bc37e2
commit
79c18eb781
1
NEWS
1
NEWS
@ -16,6 +16,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
|
||||
- Fix show-stopper bug in %URI.MakeAbsolute functionality
|
||||
. Add prefix directory to include path for standalone, this prevents
|
||||
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
|
||||
# flush-htmldefinition-cache.php superseded in favor of a generic
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ require_once 'HTMLPurifier.php';
|
||||
|
||||
// integration test
|
||||
|
||||
class HTMLPurifierTest extends UnitTestCase
|
||||
class HTMLPurifierTest extends HTMLPurifier_Harness
|
||||
{
|
||||
var $purifier;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user