Changeset 47122 for trunk/tests/phpunit/tests/compat.php
- Timestamp:
- 01/29/2020 12:43:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/compat.php
r46625 r47122 8 8 function utf8_string_lengths() { 9 9 return array( 10 // string, character_length, byte_length10 // String, character_length, byte_length. 11 11 array( 'баба', 4, 8 ), 12 12 array( 'баб', 3, 6 ), … … 22 22 function utf8_substrings() { 23 23 return array( 24 // string, start, length, character_substring, byte_substring24 // String, start, length, character_substring, byte_substring. 25 25 array( 'баба', 0, 3, 'баб', "б\xD0" ), 26 26 array( 'баба', 0, -1, 'баб', "баб\xD0" ), … … 87 87 $this->assertEquals( 'DEF', _mb_substr( $string_ascii, 3, 5, 'ISO-8859-1' ) ); 88 88 89 // specific latin-1 as that is the default the core php test opporates under89 // Specific latin-1 as that is the default the core PHP test operates under. 90 90 $this->assertEquals( 'peacrOiqng==', base64_encode( _mb_substr( $string_mb, 2, 7, 'latin-1' ) ) ); 91 91 $this->assertEquals( '6Kqe44OG44Kt44K544OI44Gn44GZ', base64_encode( _mb_substr( $string_mb, 2, 7, 'utf-8' ) ) ); … … 104 104 12345, 105 105 -2345, 106 // float data106 // Float data. 107 107 10.5, 108 108 -10.5, … … 110 110 12.3456789000E-10, 111 111 .5, 112 // null data112 // Null data. 113 113 null, 114 114 null, 115 // boolean data115 // Boolean data. 116 116 true, 117 117 false, 118 118 true, 119 119 false, 120 // empty data121 '', 122 '', 123 // string data120 // Empty data. 121 '', 122 '', 123 // String data. 124 124 'string', 125 125 'string', 126 126 $heredoc, 127 // object data127 // Object data. 128 128 new ClassA(), 129 129 // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged -- intentionally undefined data
Note: See TracChangeset
for help on using the changeset viewer.