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,18 +2,18 @@
|
||||
|
||||
class HTMLPurifier_VarParser_FlexibleTest extends HTMLPurifier_VarParserHarness
|
||||
{
|
||||
|
||||
|
||||
function testValidate() {
|
||||
|
||||
|
||||
$this->assertValid('foobar', 'string');
|
||||
$this->assertValid('foobar', 'text');
|
||||
$this->assertValid('FOOBAR', 'istring', 'foobar');
|
||||
$this->assertValid('FOOBAR', 'itext', 'foobar');
|
||||
|
||||
|
||||
$this->assertValid(34, 'int');
|
||||
|
||||
|
||||
$this->assertValid(3.34, 'float');
|
||||
|
||||
|
||||
$this->assertValid(false, 'bool');
|
||||
$this->assertValid(0, 'bool', false);
|
||||
$this->assertValid(1, 'bool', true);
|
||||
@@ -22,13 +22,13 @@ class HTMLPurifier_VarParser_FlexibleTest extends HTMLPurifier_VarParserHarness
|
||||
$this->assertValid('1', 'bool', true);
|
||||
$this->assertInvalid(34, 'bool');
|
||||
$this->assertInvalid(null, 'bool');
|
||||
|
||||
|
||||
$this->assertValid(array('1', '2', '3'), 'list');
|
||||
$this->assertValid('foo,bar, cow', 'list', array('foo', 'bar', 'cow'));
|
||||
$this->assertValid('', 'list', array());
|
||||
$this->assertValid("foo\nbar", 'list', array('foo', 'bar'));
|
||||
$this->assertValid("foo\nbar,baz", 'list', array('foo', 'bar', 'baz'));
|
||||
|
||||
|
||||
$this->assertValid(array('1' => true, '2' => true), 'lookup');
|
||||
$this->assertValid(array('1', '2'), 'lookup', array('1' => true, '2' => true));
|
||||
$this->assertValid('foo,bar', 'lookup', array('foo' => true, 'bar' => true));
|
||||
@@ -36,7 +36,7 @@ class HTMLPurifier_VarParser_FlexibleTest extends HTMLPurifier_VarParserHarness
|
||||
$this->assertValid("foo\nbar,baz", 'lookup', array('foo' => true, 'bar' => true, 'baz' => true));
|
||||
$this->assertValid('', 'lookup', array());
|
||||
$this->assertValid(array(), 'lookup');
|
||||
|
||||
|
||||
$this->assertValid(array('foo' => 'bar'), 'hash');
|
||||
$this->assertValid(array(1 => 'moo'), 'hash');
|
||||
$this->assertInvalid(array(0 => 'moo'), 'hash');
|
||||
@@ -46,19 +46,19 @@ class HTMLPurifier_VarParser_FlexibleTest extends HTMLPurifier_VarParserHarness
|
||||
$this->assertValid('foo:bar,too', 'hash', array('foo' => 'bar'));
|
||||
$this->assertValid('foo:bar,', 'hash', array('foo' => 'bar'));
|
||||
$this->assertValid('foo:bar:baz', 'hash', array('foo' => 'bar:baz'));
|
||||
|
||||
|
||||
$this->assertValid(23, 'mixed');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function testValidate_withMagicNumbers() {
|
||||
$this->assertValid('foobar', HTMLPurifier_VarParser::STRING);
|
||||
}
|
||||
|
||||
|
||||
function testValidate_null() {
|
||||
$this->assertIdentical($this->parser->parse(null, 'string', true), null);
|
||||
$this->expectException('HTMLPurifier_VarParserException');
|
||||
$this->parser->parse(null, 'string', false);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
class HTMLPurifier_VarParser_NativeTest extends HTMLPurifier_VarParserHarness
|
||||
{
|
||||
|
||||
|
||||
public function testValidateSimple() {
|
||||
$this->assertValid('"foo\\\\"', 'string', 'foo\\');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user