mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-06 06:07:26 +02:00
Define AttrDef_Text and parseCDATA().
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@160 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
22
tests/HTMLPurifier/AttrDefTest.php
Normal file
22
tests/HTMLPurifier/AttrDefTest.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
require_once 'HTMLPurifier/AttrDef.php';
|
||||
|
||||
class HTMLPurifier_AttrDefTest extends UnitTestCase
|
||||
{
|
||||
|
||||
function test_parseCDATA() {
|
||||
|
||||
$def = new HTMLPurifier_AttrDef();
|
||||
|
||||
$this->assertEqual('', $def->parseCDATA(''));
|
||||
$this->assertEqual('', $def->parseCDATA("\t\n\r \t\t"));
|
||||
$this->assertEqual('foo', $def->parseCDATA("\t\n\r foo\t\t"));
|
||||
$this->assertEqual('ignorelinefeeds', $def->parseCDATA("ignore\nline\nfeeds"));
|
||||
$this->assertEqual('translate to space', $def->parseCDATA("translate\rto\tspace"));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user