From a0df5f3b542abfd1078ac04e9a2081a1f71e3b11 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Tue, 7 Apr 2020 22:24:40 +0200 Subject: [PATCH] Revert "Went to fast and forgot to update tests" This reverts commit 656eac74fa6074aebc087bb73d2e4651f7dc8c9e. --- .../tests/mb_substitute_character.phpt | 3 +- .../tests/mb_substitute_character_basic.phpt | 6 ++- .../mb_substitute_character_variation1.phpt | 39 ++++++++++++------- 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/ext/mbstring/tests/mb_substitute_character.phpt b/ext/mbstring/tests/mb_substitute_character.phpt index fc665ba199..502a4136dd 100644 --- a/ext/mbstring/tests/mb_substitute_character.phpt +++ b/ext/mbstring/tests/mb_substitute_character.phpt @@ -41,4 +41,5 @@ string(4) "82a0" bool(true) string(6) "entity" string(20) "262378323636303b82a0" -bool(true) +ERR: Warning +bool(false) diff --git a/ext/mbstring/tests/mb_substitute_character_basic.phpt b/ext/mbstring/tests/mb_substitute_character_basic.phpt index 0fc062ec21..9fa3a5b1ac 100644 --- a/ext/mbstring/tests/mb_substitute_character_basic.phpt +++ b/ext/mbstring/tests/mb_substitute_character_basic.phpt @@ -28,7 +28,7 @@ var_dump( mb_substitute_character("b") ); ?> ===DONE=== ---EXPECT-- +--EXPECTF-- *** Testing mb_substitute_character() : basic functionality *** int(63) bool(true) @@ -37,5 +37,7 @@ bool(true) int(1234) bool(true) string(4) "none" -bool(true) + +Warning: mb_substitute_character(): Unknown character in %s on line %d +bool(false) ===DONE=== diff --git a/ext/mbstring/tests/mb_substitute_character_variation1.phpt b/ext/mbstring/tests/mb_substitute_character_variation1.phpt index be3b81018a..f738876469 100644 --- a/ext/mbstring/tests/mb_substitute_character_variation1.phpt +++ b/ext/mbstring/tests/mb_substitute_character_variation1.phpt @@ -123,7 +123,8 @@ fclose($fp); *** Testing mb_substitute_character() : usage variation *** --int 0-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --int 1-- bool(true) @@ -151,10 +152,12 @@ Error: 2 - mb_substitute_character(): Unknown character, %s(%d) bool(false) --float .5-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --empty array-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --int indexed array-- bool(true) @@ -166,22 +169,26 @@ bool(true) bool(true) --uppercase NULL-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --lowercase null-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --lowercase true-- bool(true) --lowercase false-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --uppercase TRUE-- bool(true) --uppercase FALSE-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --empty string DQ-- bool(true) @@ -190,16 +197,20 @@ bool(true) bool(true) --string DQ-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --string SQ-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --mixed case string-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --heredoc-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --instance of classWithToString-- Error: 8 - Object of class classWithToString could not be converted to int, %s(%d) @@ -210,8 +221,10 @@ Error: 8 - Object of class classWithoutToString could not be converted to int, % bool(true) --undefined var-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) --unset var-- -bool(true) +Error: 2 - mb_substitute_character(): Unknown character, %s(%d) +bool(false) ===DONE=== -- 2.40.0