aboutsummaryrefslogtreecommitdiffstats
path: root/lib/htmlpurifier/tests/HTMLPurifier/Strategy/MakeWellFormed_ErrorsTest.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-18 03:59:10 -0700
committerfriendica <info@friendica.com>2012-07-18 03:59:10 -0700
commit22cf19e174bcee88b44968f2773d1bad2da2b54d (patch)
treef4e01db6f73754418438b020c2327e18c256653c /lib/htmlpurifier/tests/HTMLPurifier/Strategy/MakeWellFormed_ErrorsTest.php
parent7a40f4354b32809af3d0cfd6e3af0eda02ab0e0a (diff)
downloadvolse-hubzilla-22cf19e174bcee88b44968f2773d1bad2da2b54d.tar.gz
volse-hubzilla-22cf19e174bcee88b44968f2773d1bad2da2b54d.tar.bz2
volse-hubzilla-22cf19e174bcee88b44968f2773d1bad2da2b54d.zip
bad sync with github windows client
Diffstat (limited to 'lib/htmlpurifier/tests/HTMLPurifier/Strategy/MakeWellFormed_ErrorsTest.php')
-rw-r--r--lib/htmlpurifier/tests/HTMLPurifier/Strategy/MakeWellFormed_ErrorsTest.php62
1 files changed, 0 insertions, 62 deletions
diff --git a/lib/htmlpurifier/tests/HTMLPurifier/Strategy/MakeWellFormed_ErrorsTest.php b/lib/htmlpurifier/tests/HTMLPurifier/Strategy/MakeWellFormed_ErrorsTest.php
deleted file mode 100644
index e825e2e2a..000000000
--- a/lib/htmlpurifier/tests/HTMLPurifier/Strategy/MakeWellFormed_ErrorsTest.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
-class HTMLPurifier_Strategy_MakeWellFormed_ErrorsTest extends HTMLPurifier_Strategy_ErrorsHarness
-{
-
- protected function getStrategy() {
- return new HTMLPurifier_Strategy_MakeWellFormed();
- }
-
- function testUnnecessaryEndTagRemoved() {
- $this->expectErrorCollection(E_WARNING, 'Strategy_MakeWellFormed: Unnecessary end tag removed');
- $this->expectContext('CurrentToken', new HTMLPurifier_Token_End('b', array(), 1, 0));
- $this->invoke('</b>');
- }
-
- function testUnnecessaryEndTagToText() {
- $this->config->set('Core.EscapeInvalidTags', true);
- $this->expectErrorCollection(E_WARNING, 'Strategy_MakeWellFormed: Unnecessary end tag to text');
- $this->expectContext('CurrentToken', new HTMLPurifier_Token_End('b', array(), 1, 0));
- $this->invoke('</b>');
- }
-
- function testTagAutoclose() {
- $this->expectErrorCollection(E_NOTICE, 'Strategy_MakeWellFormed: Tag auto closed', new HTMLPurifier_Token_Start('p', array(), 1, 0));
- $this->expectContext('CurrentToken', new HTMLPurifier_Token_Start('div', array(), 1, 6));
- $this->invoke('<p>Foo<div>Bar</div>');
- }
-
- function testTagCarryOver() {
- $b = new HTMLPurifier_Token_Start('b', array(), 1, 0);
- $this->expectErrorCollection(E_NOTICE, 'Strategy_MakeWellFormed: Tag carryover', $b);
- $this->expectContext('CurrentToken', new HTMLPurifier_Token_Start('div', array(), 1, 6));
- $this->invoke('<b>Foo<div>Bar</div>');
- }
-
- function testStrayEndTagRemoved() {
- $this->expectErrorCollection(E_WARNING, 'Strategy_MakeWellFormed: Stray end tag removed');
- $this->expectContext('CurrentToken', new HTMLPurifier_Token_End('b', array(), 1, 3));
- $this->invoke('<i></b></i>');
- }
-
- function testStrayEndTagToText() {
- $this->config->set('Core.EscapeInvalidTags', true);
- $this->expectErrorCollection(E_WARNING, 'Strategy_MakeWellFormed: Stray end tag to text');
- $this->expectContext('CurrentToken', new HTMLPurifier_Token_End('b', array(), 1, 3));
- $this->invoke('<i></b></i>');
- }
-
- function testTagClosedByElementEnd() {
- $this->expectErrorCollection(E_NOTICE, 'Strategy_MakeWellFormed: Tag closed by element end', new HTMLPurifier_Token_Start('b', array(), 1, 3));
- $this->expectContext('CurrentToken', new HTMLPurifier_Token_End('i', array(), 1, 12));
- $this->invoke('<i><b>Foobar</i>');
- }
-
- function testTagClosedByDocumentEnd() {
- $this->expectErrorCollection(E_NOTICE, 'Strategy_MakeWellFormed: Tag closed by document end', new HTMLPurifier_Token_Start('b', array(), 1, 0));
- $this->invoke('<b>Foobar');
- }
-
-}
-
-// vim: et sw=4 sts=4