PATH:
home
/
letacommog
/
crmleta
/
consumerportal
/
include
/
htmlpurify
/
tests
/
HTMLPurifier
<?php Mock::generatePartial( 'HTMLPurifier_AttrTransform', 'HTMLPurifier_AttrTransformTestable', array('transform')); class HTMLPurifier_AttrTransformTest extends HTMLPurifier_Harness { function test_prependCSS() { $t = new HTMLPurifier_AttrTransformTestable(); $attr = array(); $t->prependCSS($attr, 'style:new;'); $this->assertIdentical(array('style' => 'style:new;'), $attr); $attr = array('style' => 'style:original;'); $t->prependCSS($attr, 'style:new;'); $this->assertIdentical(array('style' => 'style:new;style:original;'), $attr); $attr = array('style' => 'style:original;', 'misc' => 'un-related'); $t->prependCSS($attr, 'style:new;'); $this->assertIdentical(array('style' => 'style:new;style:original;', 'misc' => 'un-related'), $attr); } function test_confiscateAttr() { $t = new HTMLPurifier_AttrTransformTestable(); $attr = array('flavor' => 'sweet'); $this->assertIdentical('sweet', $t->confiscateAttr($attr, 'flavor')); $this->assertIdentical(array(), $attr); $attr = array('flavor' => 'sweet'); $this->assertIdentical(null, $t->confiscateAttr($attr, 'color')); $this->assertIdentical(array('flavor' => 'sweet'), $attr); } } // vim: et sw=4 sts=4
[+]
..
[+]
ConfigSchema
[-] AttrDefTest.php
[edit]
[-] EntityParserTest.php
[edit]
[-] VarParserHarness.php
[edit]
[-] URITest.php
[edit]
[-] ErrorCollectorTest.php
[edit]
[+]
URIFilter
[-] GeneratorTest.php
[edit]
[-] HTMLModuleTest.php
[edit]
[-] PercentEncoderTest.php
[edit]
[-] UnitConverterTest.php
[edit]
[+]
Injector
[+]
AttrTransform
[+]
AttrDef
[-] ConfigSchemaTest.php
[edit]
[-] EntityLookupTest.php
[edit]
[-] InjectorHarness.php
[edit]
[-] ErrorsHarness.php
[edit]
[-] DoctypeRegistryTest.php
[edit]
[-] URIFilterHarness.php
[edit]
[-] HTMLModuleHarness.php
[edit]
[-] ChildDefHarness.php
[edit]
[-] URIDefinitionTest.php
[edit]
[-] AttrCollectionsTest.php
[edit]
[-] ConfigTest.php
[edit]
[+]
PHPT
[-] URIHarness.php
[edit]
[-] TokenTest.php
[edit]
[-] LexerTest.php
[edit]
[-] IDAccumulatorTest.php
[edit]
[+]
SimpleTest
[-] DefinitionCacheFactoryTest.php
[edit]
[-] ConfigTest-finalize.ini
[edit]
[+]
VarParser
[-] AttrValidator_ErrorsTest.php
[edit]
[-] ConfigTest-loadIni.ini
[edit]
[-] StringHashTest.php
[edit]
[-] ElementDefTest.php
[edit]
[-] HTMLDefinitionTest.php
[edit]
[-] DefinitionTest.php
[edit]
[-] ConfigTest-create.ini
[edit]
[-] HTMLModuleManagerTest.php
[edit]
[+]
Filter
[+]
HTMLT
[-] Harness.php
[edit]
[-] DefinitionTestable.php
[edit]
[+]
HTMLModule
[-] URISchemeRegistryTest.php
[edit]
[-] AttrTransformHarness.php
[edit]
[-] AttrTypesTest.php
[edit]
[-] ErrorCollectorEMock.php
[edit]
[-] LanguageTest.php
[edit]
[-] TokenFactoryTest.php
[edit]
[-] AttrDefHarness.php
[edit]
[+]
Strategy
[-] EncoderTest.php
[edit]
[-] DefinitionCacheHarness.php
[edit]
[-] ContextTest.php
[edit]
[-] TagTransformTest.php
[edit]
[-] ComplexHarness.php
[edit]
[+]
StringHashParser
[-] LanguageFactoryTest.php
[edit]
[-] HTMLT.php
[edit]
[-] DefinitionCacheTest.php
[edit]
[-] URIParserTest.php
[edit]
[+]
ChildDef
[-] StrategyHarness.php
[edit]
[-] URISchemeTest.php
[edit]
[-] PropertyListTest.php
[edit]
[-] LengthTest.php
[edit]
[-] AttrTransformTest.php
[edit]
[+]
DefinitionCache
[+]
Lexer
[-] StringHashParserTest.php
[edit]