mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-05 13:47:24 +02:00
Remove trailing whitespace.
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
class HTMLPurifier_AttrValidator_ErrorsTest extends HTMLPurifier_ErrorsHarness
|
||||
{
|
||||
|
||||
|
||||
public function setup() {
|
||||
parent::setup();
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
@@ -11,12 +11,12 @@ class HTMLPurifier_AttrValidator_ErrorsTest extends HTMLPurifier_ErrorsHarness
|
||||
$this->collector = new HTMLPurifier_ErrorCollector($this->context);
|
||||
$this->context->register('Generator', new HTMLPurifier_Generator($config, $this->context));
|
||||
}
|
||||
|
||||
|
||||
protected function invoke($input) {
|
||||
$validator = new HTMLPurifier_AttrValidator();
|
||||
$validator->validateToken($input, $this->config, $this->context);
|
||||
}
|
||||
|
||||
|
||||
function testAttributesTransformedGlobalPre() {
|
||||
$this->config->set('HTML', 'DefinitionID',
|
||||
'HTMLPurifier_AttrValidator_ErrorsTest::testAttributesTransformedGlobalPre');
|
||||
@@ -27,17 +27,17 @@ class HTMLPurifier_AttrValidator_ErrorsTest extends HTMLPurifier_ErrorsHarness
|
||||
$output = array('class' => 'value'); // must be valid
|
||||
$transform->setReturnValue('transform', $output, array($input, new AnythingExpectation(), new AnythingExpectation()));
|
||||
$def->info_attr_transform_pre[] = $transform;
|
||||
|
||||
|
||||
$token = new HTMLPurifier_Token_Start('span', $input, 1);
|
||||
$this->invoke($token);
|
||||
|
||||
|
||||
$result = $this->collector->getRaw();
|
||||
$expect = array(
|
||||
array(1, E_NOTICE, 'Attributes on <span> transformed from original to class', array()),
|
||||
);
|
||||
$this->assertIdentical($result, $expect);
|
||||
}
|
||||
|
||||
|
||||
function testAttributesTransformedLocalPre() {
|
||||
$this->config->set('HTML', 'TidyLevel', 'heavy');
|
||||
$input = array('align' => 'right');
|
||||
@@ -50,9 +50,9 @@ class HTMLPurifier_AttrValidator_ErrorsTest extends HTMLPurifier_ErrorsHarness
|
||||
);
|
||||
$this->assertIdentical($result, $expect);
|
||||
}
|
||||
|
||||
|
||||
// too lazy to check for global post and global pre
|
||||
|
||||
|
||||
function testAttributeRemoved() {
|
||||
$token = new HTMLPurifier_Token_Start('p', array('foobar' => 'right'), 1);
|
||||
$this->invoke($token);
|
||||
@@ -62,6 +62,6 @@ class HTMLPurifier_AttrValidator_ErrorsTest extends HTMLPurifier_ErrorsHarness
|
||||
);
|
||||
$this->assertIdentical($result, $expect);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user