From 22cf19e174bcee88b44968f2773d1bad2da2b54d Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 18 Jul 2012 03:59:10 -0700 Subject: bad sync with github windows client --- .../Strategy/RemoveForeignElements_ErrorsTest.php | 71 ---------------------- 1 file changed, 71 deletions(-) delete mode 100644 lib/htmlpurifier/tests/HTMLPurifier/Strategy/RemoveForeignElements_ErrorsTest.php (limited to 'lib/htmlpurifier/tests/HTMLPurifier/Strategy/RemoveForeignElements_ErrorsTest.php') diff --git a/lib/htmlpurifier/tests/HTMLPurifier/Strategy/RemoveForeignElements_ErrorsTest.php b/lib/htmlpurifier/tests/HTMLPurifier/Strategy/RemoveForeignElements_ErrorsTest.php deleted file mode 100644 index 4b4e31074..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/Strategy/RemoveForeignElements_ErrorsTest.php +++ /dev/null @@ -1,71 +0,0 @@ -config->set('HTML.TidyLevel', 'heavy'); - } - - protected function getStrategy() { - return new HTMLPurifier_Strategy_RemoveForeignElements(); - } - - function testTagTransform() { - $this->expectErrorCollection(E_NOTICE, 'Strategy_RemoveForeignElements: Tag transform', 'center'); - $this->expectContext('CurrentToken', new HTMLPurifier_Token_Start('div', array('style' => 'text-align:center;'), 1)); - $this->invoke('
'); - } - - function testMissingRequiredAttr() { - // a little fragile, since img has two required attributes - $this->expectErrorCollection(E_ERROR, 'Strategy_RemoveForeignElements: Missing required attribute', 'alt'); - $this->expectContext('CurrentToken', new HTMLPurifier_Token_Empty('img', array(), 1)); - $this->invoke(''); - } - - function testForeignElementToText() { - $this->config->set('Core.EscapeInvalidTags', true); - $this->expectErrorCollection(E_WARNING, 'Strategy_RemoveForeignElements: Foreign element to text'); - $this->expectContext('CurrentToken', new HTMLPurifier_Token_Start('invalid', array(), 1)); - $this->invoke(''); - } - - function testForeignElementRemoved() { - // uses $CurrentToken.Serialized - $this->expectErrorCollection(E_ERROR, 'Strategy_RemoveForeignElements: Foreign element removed'); - $this->expectContext('CurrentToken', new HTMLPurifier_Token_Start('invalid', array(), 1)); - $this->invoke(''); - } - - function testCommentRemoved() { - $this->expectErrorCollection(E_NOTICE, 'Strategy_RemoveForeignElements: Comment removed'); - $this->expectContext('CurrentToken', new HTMLPurifier_Token_Comment(' test ', 1)); - $this->invoke(''); - } - - function testTrailingHyphenInCommentRemoved() { - $this->config->set('HTML.Trusted', true); - $this->expectErrorCollection(E_NOTICE, 'Strategy_RemoveForeignElements: Trailing hyphen in comment removed'); - $this->expectContext('CurrentToken', new HTMLPurifier_Token_Comment(' test ', 1)); - $this->invoke(''); - } - - function testDoubleHyphenInCommentRemoved() { - $this->config->set('HTML.Trusted', true); - $this->expectErrorCollection(E_NOTICE, 'Strategy_RemoveForeignElements: Hyphens in comment collapsed'); - $this->expectContext('CurrentToken', new HTMLPurifier_Token_Comment(' test - test - test ', 1)); - $this->invoke(''); - } - - function testForeignMetaElementRemoved() { - $this->collector->expectAt(0, 'send', array(E_ERROR, 'Strategy_RemoveForeignElements: Foreign meta element removed')); - $this->collector->expectContextAt(0, 'CurrentToken', new HTMLPurifier_Token_Start('script', array(), 1)); - $this->collector->expectAt(1, 'send', array(E_ERROR, 'Strategy_RemoveForeignElements: Token removed to end', 'script')); - $this->invoke('