mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-31 03:10:09 +02:00
Add integration test.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/branches/1.0@372 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
23
tests/HTMLPurifier/Test.php
Normal file
23
tests/HTMLPurifier/Test.php
Normal 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");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user