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

Merged 371:372 from branches/1.0/ to trunk/

- Add integration test.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@374 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2006-09-01 17:56:55 +00:00
parent de3b2b70fb
commit 2259bfa40e
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,23 @@
<?php
require_once 'HTMLPurifier.php';
// integration test
class HTMLPurifier_Test extends UnitTestCase
{
var $purifier;
function assertPurification($input, $expect) {
$result = $this->purifier->purify($input);
$this->assertIdentical($expect, $result);
}
function test() {
$config = HTMLPurifier_Config::createDefault();
$this->purifier = new HTMLPurifier($config);
$this->assertPurification("Null byte\0", "Null byte");
}
}
?>

View File

@ -88,6 +88,7 @@ $test_files[] = 'URISchemeRegistryTest.php';
$test_files[] = 'URISchemeTest.php'; $test_files[] = 'URISchemeTest.php';
$test_files[] = 'EncoderTest.php'; $test_files[] = 'EncoderTest.php';
$test_files[] = 'EntityParserTest.php'; $test_files[] = 'EntityParserTest.php';
$test_files[] = 'Test.php';
if (version_compare(PHP_VERSION, '5', '>=')) { if (version_compare(PHP_VERSION, '5', '>=')) {
$test_files[] = 'TokenFactoryTest.php'; $test_files[] = 'TokenFactoryTest.php';