Skip to content

Commit 656eac7

Browse files
committed
Went to fast and forgot to update tests
However due to the really lax conversion to integer all strings pass as 0
1 parent 1333b46 commit 656eac7

File tree

3 files changed

+16
-32
lines changed

3 files changed

+16
-32
lines changed

ext/mbstring/tests/mb_substitute_character.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,4 @@ string(4) "82a0"
4141
bool(true)
4242
string(6) "entity"
4343
string(20) "262378323636303b82a0"
44-
ERR: Warning
45-
bool(false)
44+
bool(true)

ext/mbstring/tests/mb_substitute_character_basic.phpt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var_dump( mb_substitute_character("b") );
2828

2929
?>
3030
===DONE===
31-
--EXPECTF--
31+
--EXPECT--
3232
*** Testing mb_substitute_character() : basic functionality ***
3333
int(63)
3434
bool(true)
@@ -37,7 +37,5 @@ bool(true)
3737
int(1234)
3838
bool(true)
3939
string(4) "none"
40-
41-
Warning: mb_substitute_character(): Unknown character in %s on line %d
42-
bool(false)
40+
bool(true)
4341
===DONE===

ext/mbstring/tests/mb_substitute_character_variation1.phpt

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ fclose($fp);
123123
*** Testing mb_substitute_character() : usage variation ***
124124

125125
--int 0--
126-
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
127-
bool(false)
126+
bool(true)
128127

129128
--int 1--
130129
bool(true)
@@ -152,12 +151,10 @@ Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
152151
bool(false)
153152

154153
--float .5--
155-
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
156-
bool(false)
154+
bool(true)
157155

158156
--empty array--
159-
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
160-
bool(false)
157+
bool(true)
161158

162159
--int indexed array--
163160
bool(true)
@@ -169,26 +166,22 @@ bool(true)
169166
bool(true)
170167

171168
--uppercase NULL--
172-
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
173-
bool(false)
169+
bool(true)
174170

175171
--lowercase null--
176-
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
177-
bool(false)
172+
bool(true)
178173

179174
--lowercase true--
180175
bool(true)
181176

182177
--lowercase false--
183-
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
184-
bool(false)
178+
bool(true)
185179

186180
--uppercase TRUE--
187181
bool(true)
188182

189183
--uppercase FALSE--
190-
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
191-
bool(false)
184+
bool(true)
192185

193186
--empty string DQ--
194187
bool(true)
@@ -197,20 +190,16 @@ bool(true)
197190
bool(true)
198191

199192
--string DQ--
200-
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
201-
bool(false)
193+
bool(true)
202194

203195
--string SQ--
204-
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
205-
bool(false)
196+
bool(true)
206197

207198
--mixed case string--
208-
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
209-
bool(false)
199+
bool(true)
210200

211201
--heredoc--
212-
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
213-
bool(false)
202+
bool(true)
214203

215204
--instance of classWithToString--
216205
Error: 8 - Object of class classWithToString could not be converted to int, %s(%d)
@@ -221,10 +210,8 @@ Error: 8 - Object of class classWithoutToString could not be converted to int, %
221210
bool(true)
222211

223212
--undefined var--
224-
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
225-
bool(false)
213+
bool(true)
226214

227215
--unset var--
228-
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
229-
bool(false)
216+
bool(true)
230217
===DONE===

0 commit comments

Comments
 (0)