From c22ccc149203b9e69c82a11198d77d3074b6dbcc Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Sun, 11 Feb 2007 20:56:17 +0000 Subject: [PATCH] new test --- ext/standard/tests/strings/str_ireplace.phpt | 153 +++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 ext/standard/tests/strings/str_ireplace.phpt diff --git a/ext/standard/tests/strings/str_ireplace.phpt b/ext/standard/tests/strings/str_ireplace.phpt new file mode 100644 index 0000000000..ceb18d8b8d --- /dev/null +++ b/ext/standard/tests/strings/str_ireplace.phpt @@ -0,0 +1,153 @@ +--TEST-- +str_ireplace() tests +--FILE-- +"ttttTttttttttTT", "test"=>"aayyaayasdayYahsdYYY"))); +var_dump(str_ireplace(array("t"=>"tt", "y"=>"y"), array("a"=>"aaa", "b"=>"bbb"), array("key"=>"ttttTttttttttTT", "test"=>"aayyaayasdayYahsdYYY"))); + +/* separate testcase for str_ireplace() off-by-one */ + +$Data = "Change tracking and management software designed to watch + for abnormal system behavior.\nSuggest features, report bugs, or ask + questions here."; +var_dump($Data = str_ireplace("\r\n", "
", $Data)); +var_dump($Data = str_ireplace("\n", "
", $Data)); + + +echo "Done\n"; +?> +--EXPECTF-- +Warning: str_ireplace() expects at least 3 parameters, 0 given in %s on line %d +NULL + +Warning: str_ireplace() expects at least 3 parameters, 1 given in %s on line %d +NULL + +Warning: str_ireplace() expects at least 3 parameters, 2 given in %s on line %d +NULL +string(0) "" +string(8) "aaaaaaaT" +string(8) "aaaaaaaT" +int(7) +string(15) "aaaaaaaaaaaaaaT" +string(15) "aaaaaaaaaaaaaaT" +int(7) +string(22) "aaaaaaaaaaaaaaaaaaaaaT" +string(22) "aaaaaaaaaaaaaaaaaaaaaT" +int(7) +string(22) "aaaaaaaaaaaaaaaaaaaaaT" +string(22) "aaaaaaaaaaaaaaaaaaaaaT" +int(7) +string(22) "aaaaaaaaaaaaaaaaaaaaaT" +string(22) "aaaaaaaaaaaaaaaaaaaaaT" +string(22) "aaaaaaaaaaaaaaaaaaaaaT" +string(22) "aaaaaaaaaaaaaaaaaaaaaT" +string(22) "aaaaaaaaaaaaaaaaaaaaaT" +string(22) "aaaaaaaaaaaaaaaaaaaaaT" +array(2) { + [0]=> + string(22) "aaaaaaaaaaaaaaaaaaaaaT" + [1]=> + string(36) "aabbbbbbaabbbasdabbbbbbahsdbbbbbbbbb" +} +array(2) { + ["key"]=> + string(22) "aaaaaaaaaaaaaaaaaaaaaT" + ["test"]=> + string(36) "aabbbbbbaabbbasdabbbbbbahsdbbbbbbbbb" +} +array(2) { + ["key"]=> + string(22) "aaaaaaaaaaaaaaaaaaaaaT" + ["test"]=> + string(36) "aabbbbbbaabbbasdabbbbbbahsdbbbbbbbbb" +} +string(143) "Change tracking and management software designed to watch + for abnormal system behavior. +Suggest features, report bugs, or ask + questions here." +string(152) "Change tracking and management software designed to watch
for abnormal system behavior.
Suggest features, report bugs, or ask
questions here." +Done +--UEXPECTF-- +Warning: str_ireplace() expects at least 3 parameters, 0 given in %s on line %d +NULL + +Warning: str_ireplace() expects at least 3 parameters, 1 given in %s on line %d +NULL + +Warning: str_ireplace() expects at least 3 parameters, 2 given in %s on line %d +NULL +unicode(0) "" +unicode(8) "aaaaaaaT" +unicode(8) "aaaaaaaT" +int(7) +unicode(15) "aaaaaaaaaaaaaaT" +unicode(15) "aaaaaaaaaaaaaaT" +int(7) +unicode(22) "aaaaaaaaaaaaaaaaaaaaaT" +unicode(22) "aaaaaaaaaaaaaaaaaaaaaT" +int(7) +unicode(22) "aaaaaaaaaaaaaaaaaaaaaT" +unicode(22) "aaaaaaaaaaaaaaaaaaaaaT" +int(7) +unicode(22) "aaaaaaaaaaaaaaaaaaaaaT" +unicode(22) "aaaaaaaaaaaaaaaaaaaaaT" +unicode(22) "aaaaaaaaaaaaaaaaaaaaaT" +unicode(22) "aaaaaaaaaaaaaaaaaaaaaT" +unicode(22) "aaaaaaaaaaaaaaaaaaaaaT" +unicode(22) "aaaaaaaaaaaaaaaaaaaaaT" +array(2) { + [0]=> + unicode(22) "aaaaaaaaaaaaaaaaaaaaaT" + [1]=> + unicode(36) "aabbbbbbaabbbasdabbbbbbahsdbbbbbbbbb" +} +array(2) { + [u"key"]=> + unicode(22) "aaaaaaaaaaaaaaaaaaaaaT" + [u"test"]=> + unicode(36) "aabbbbbbaabbbasdabbbbbbahsdbbbbbbbbb" +} +array(2) { + [u"key"]=> + unicode(22) "aaaaaaaaaaaaaaaaaaaaaT" + [u"test"]=> + unicode(36) "aabbbbbbaabbbasdabbbbbbahsdbbbbbbbbb" +} +unicode(143) "Change tracking and management software designed to watch + for abnormal system behavior. +Suggest features, report bugs, or ask + questions here." +unicode(152) "Change tracking and management software designed to watch
for abnormal system behavior.
Suggest features, report bugs, or ask
questions here." +Done -- 2.40.0