* This test StringUtils::isUtf8 whenever we have mbstring extension
* loaded.
*
- * @cover StringUtils::isUtf8
+ * @covers StringUtils::isUtf8
* @dataProvider provideStringsForIsUtf8Check
*/
function testIsUtf8WithMbstring( $expected, $string ) {
* implementation used as a fallback when mb_check_encoding() is
* not available.
*
- * @cover StringUtils::isUtf8
+ * @covers StringUtils::isUtf8
* @dataProvider provideStringsForIsUtf8Check
*/
function testIsUtf8WithPhpFallbackImplementation( $expected, $string ) {
*/
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 ) {