From d417de70fcf39e0a7a15ba780b597914d16ca0f7 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 12 Mar 2014 18:12:23 +0100 Subject: Update to MediaWiki 1.22.4 --- tests/phpunit/includes/HtmlFormatterTest.php | 81 ---------------------------- 1 file changed, 81 deletions(-) delete mode 100644 tests/phpunit/includes/HtmlFormatterTest.php (limited to 'tests/phpunit/includes/HtmlFormatterTest.php') diff --git a/tests/phpunit/includes/HtmlFormatterTest.php b/tests/phpunit/includes/HtmlFormatterTest.php deleted file mode 100644 index a37df74f..00000000 --- a/tests/phpunit/includes/HtmlFormatterTest.php +++ /dev/null @@ -1,81 +0,0 @@ -filterContent(); - $html = $formatter->getText(); - $this->assertEquals( self::normalize( $expected ), self::normalize( $html ) ); - } - - private static function normalize( $s ) { - return str_replace( "\n", '', - str_replace( "\r", '', $s ) // "yay" to Windows! - ); - } - - public function getHtmlData() { - $removeImages = function( HtmlFormatter $f ) { - $f->setRemoveMedia(); - }; - $removeTags = function( HtmlFormatter $f ) { - $f->remove( array( 'table', '.foo', '#bar', 'div.baz' ) ); - }; - $flattenSomeStuff = function( HtmlFormatter $f ) { - $f->flatten( array( 's', 'div' ) ); - }; - $flattenEverything = function( HtmlFormatter $f ) { - $f->flattenAllTags(); - }; - return array( - // remove images if asked - array( - 'Blah', - '', - $removeImages, - ), - // basic tag removal - array( - '
foo
foo
foo
bar -foobar
test
-baz', - - '
test
-baz', - $removeTags, - ), - // don't flatten tags that start like chosen ones - array( - '
foo bar
', - 'foo bar', - $flattenSomeStuff, - ), - // total flattening - array( - '
bar2
', - 'bar2', - $flattenEverything, - ), - // UTF-8 preservation and security - array( - '<Тест!> &<&&&&', - '<Тест!> &<&&&&', - ), - // https://bugzilla.wikimedia.org/show_bug.cgi?id=53086 - array( - 'Foo[1] Bar', - 'Foo[1] Bar', - ), - ); - } -} -- cgit v1.2.3-54-g00ecf