1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-05 13:47:24 +02: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

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();
}
}