Change URLs to mediawiki.org in comments to HTTPS
[lhc/web/wiklou.git] / tests / phpunit / includes / normal / CleanUpTest.php
index 99ec05d..a736234 100644 (file)
@@ -3,7 +3,7 @@
  * Tests for UtfNormal::cleanUp() function.
  *
  * Copyright © 2004 Brion Vibber <brion@pobox.com>
- * http://www.mediawiki.org/
+ * https://www.mediawiki.org/
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  *
  * @ingroup UtfNormal
  * @group Large
+ *
+ * @todo covers tags, will be UtfNormal::cleanUp once the below is resolved
+ * @todo split me into test methods and providers per the below comment
+ *
+ * We ignore code coverage for this test suite until they are rewritten
+ * to use data providers (bug 46561).
+ * @codeCoverageIgnore
  */
 class CleanUpTest extends MediaWikiTestCase {
        /** @todo document */
-       function testAscii() {
+       public function testAscii() {
                $text = 'This is plain ASCII text.';
                $this->assertEquals( $text, UtfNormal::cleanUp( $text ) );
        }
 
        /** @todo document */
-       function testNull() {
+       public function testNull() {
                $text = "a \x00 null";
                $expect = "a \xef\xbf\xbd null";
                $this->assertEquals(
@@ -48,13 +55,13 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testLatin() {
+       public function testLatin() {
                $text = "L'\xc3\xa9cole";
                $this->assertEquals( $text, UtfNormal::cleanUp( $text ) );
        }
 
        /** @todo document */
-       function testLatinNormal() {
+       public function testLatinNormal() {
                $text = "L'e\xcc\x81cole";
                $expect = "L'\xc3\xa9cole";
                $this->assertEquals( $expect, UtfNormal::cleanUp( $text ) );
@@ -101,7 +108,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testAllBytes() {
+       public function testAllBytes() {
                $this->doTestBytes( '', '' );
                $this->doTestBytes( 'x', '' );
                $this->doTestBytes( '', 'x' );
@@ -141,7 +148,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testDoubleBytes() {
+       public function testDoubleBytes() {
                $this->doTestDoubleBytes( '', '' );
                $this->doTestDoubleBytes( 'x', '' );
                $this->doTestDoubleBytes( '', 'x' );
@@ -194,7 +201,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testTripleBytes() {
+       public function testTripleBytes() {
                $this->doTestTripleBytes( '', '' );
                $this->doTestTripleBytes( 'x', '' );
                $this->doTestTripleBytes( '', 'x' );
@@ -272,7 +279,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testChunkRegression() {
+       public function testChunkRegression() {
                # Check for regression against a chunking bug
                $text = "\x46\x55\xb8" .
                        "\xdc\x96" .
@@ -295,7 +302,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testInterposeRegression() {
+       public function testInterposeRegression() {
                $text = "\x4e\x30" .
                        "\xb1" . # bad tail
                        "\x3a" .
@@ -330,7 +337,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testOverlongRegression() {
+       public function testOverlongRegression() {
                $text = "\x67" .
                        "\x1a" . # forbidden ascii
                        "\xea" . # bad head
@@ -355,7 +362,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testSurrogateRegression() {
+       public function testSurrogateRegression() {
                $text = "\xed\xb4\x96" . # surrogate 0xDD16
                        "\x83" . # bad tail
                        "\xb4" . # bad tail
@@ -370,7 +377,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testBomRegression() {
+       public function testBomRegression() {
                $text = "\xef\xbf\xbe" . # U+FFFE, illegal char
                        "\xb2" . # bad tail
                        "\xef" . # bad head
@@ -385,7 +392,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testForbiddenRegression() {
+       public function testForbiddenRegression() {
                $text = "\xef\xbf\xbf"; # U+FFFF, illegal char
                $expect = "\xef\xbf\xbd";
                $this->assertEquals(
@@ -394,7 +401,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testHangulRegression() {
+       public function testHangulRegression() {
                $text = "\xed\x9c\xaf" . # Hangul char
                        "\xe1\x87\x81"; # followed by another final jamo
                $expect = $text; # Should *not* change.