Lots of spelling mistakes and phpdoc attributes
[lhc/web/wiklou.git] / tests / phpunit / includes / StringUtilsTest.php
index ae003ae..db3d265 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,7 +24,7 @@ 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 ) {
@@ -39,7 +39,8 @@ class StringUtilsTest extends MediaWikiTestCase {
         */
        function escaped( $string ) {
                $escaped = '';
-               for ( $i = 0; $i < strlen( $string ); $i++ ) {
+               $length = strlen( $string );
+               for ( $i = 0; $i < $length; $i++ ) {
                        $char = $string[$i];
                        $val = ord( $char );
                        if ( $val > 127 ) {