Merge "Add parsoid-specific image testing"
[lhc/web/wiklou.git] / tests / phpunit / includes / StringUtilsTest.php
index 31216b3..842e2fc 100644 (file)
@@ -6,7 +6,7 @@ class StringUtilsTest extends MediaWikiTestCase {
         * This test StringUtils::isUtf8 whenever we have mbstring extension
         * loaded.
         *
-        * @cover StringUtils::isUtf8
+        * @covers StringUtils::isUtf8
         * @dataProvider provideStringsForIsUtf8Check
         */
        function testIsUtf8WithMbstring( $expected, $string ) {
@@ -24,12 +24,12 @@ class StringUtilsTest extends MediaWikiTestCase {
         * implementation used as a fallback when mb_check_encoding() is
         * not available.
         *
-        * @cover StringUtils::isUtf8
+        * @covers StringUtils::isUtf8
         * @dataProvider provideStringsForIsUtf8Check
         */
        function testIsUtf8WithPhpFallbackImplementation( $expected, $string ) {
                $this->assertEquals( $expected,
-                       StringUtils::isUtf8( $string, /** disable mbstring: */ true ),
+                       StringUtils::isUtf8( $string, /** disable mbstring: */true ),
                        'Testing string "' . $this->escaped( $string ) . '" with pure PHP implementation'
                );
        }
@@ -49,6 +49,7 @@ class StringUtilsTest extends MediaWikiTestCase {
                                $escaped .= $char;
                        }
                }
+
                return $escaped;
        }
 
@@ -57,7 +58,7 @@ class StringUtilsTest extends MediaWikiTestCase {
         * Markus Kuhn:
         * http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
         */
-       function provideStringsForIsUtf8Check() {
+       public static function provideStringsForIsUtf8Check() {
                // Expected return values for StringUtils::isUtf8()
                $PASS = true;
                $FAIL = false;
@@ -116,7 +117,7 @@ class StringUtilsTest extends MediaWikiTestCase {
                        array( $FAIL, "\xff" ),
                        array( $FAIL, "\xfe\xfe\xff\xff" ),
 
-                       /**
+                       /*
                        # The PHP implementation does not handle characters
                        # being represented in a form which is too long :(
 
@@ -133,7 +134,7 @@ class StringUtilsTest extends MediaWikiTestCase {
                        array( $FAIL, "\xf0\x8F\xbf\xbf" ),
                        array( $FAIL, "\xf8\x87\xbf\xbf" ),
                        array( $FAIL, "\xfc\x83\xbf\xbf\xbf\xbf" ),
-                       **/
+                       */
 
                        # non characters
                        array( $PASS, "\xef\xbf\xbe" ),