From: Felix De Vliegher Date: Tue, 15 Jul 2008 11:15:32 +0000 (+0000) Subject: MFB: Tests for strpbrk(), testfest.php.net task #91 and #92. X-Git-Tag: BEFORE_HEAD_NS_CHANGE~1254 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b1c0f07229cbf40769764e65b8aa59dea11bb91;p=php MFB: Tests for strpbrk(), testfest.php.net task #91 and #92. --- diff --git a/ext/standard/tests/strings/strpbrk_basic.phpt b/ext/standard/tests/strings/strpbrk_basic.phpt new file mode 100644 index 0000000000..18a6adf9ad --- /dev/null +++ b/ext/standard/tests/strings/strpbrk_basic.phpt @@ -0,0 +1,41 @@ +--TEST-- +Test strpbrk() function : basic functionality +--FILE-- + +===DONE=== +--EXPECT-- +*** Testing strpbrk() : basic functionality *** +unicode(20) "is is a Simple text." +unicode(12) "Simple text." +bool(false) +bool(false) +bool(false) +unicode(12) " aaa aaaSLR" +unicode(1) "5" +unicode(1) "5" +===DONE=== diff --git a/ext/standard/tests/strings/strpbrk_error.phpt b/ext/standard/tests/strings/strpbrk_error.phpt new file mode 100644 index 0000000000..9122658570 --- /dev/null +++ b/ext/standard/tests/strings/strpbrk_error.phpt @@ -0,0 +1,57 @@ +--TEST-- +Test strpbrk() function : error conditions +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing strpbrk() : error conditions *** + +-- Testing strpbrk() function with more than expected no. of arguments -- + +Warning: strpbrk() expects exactly 2 parameters, 3 given in %s on line %d +bool(false) + +-- Testing strpbrk() function with less than expected no. of arguments -- + +Warning: strpbrk() expects exactly 2 parameters, 1 given in %s on line %d +bool(false) + +-- Testing strpbrk() function with empty second argument -- + +Warning: strpbrk(): The character list cannot be empty in %s on line %d +bool(false) + +-- Testing strpbrk() function with arrays -- + +Warning: strpbrk() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d +bool(false) + +Warning: strpbrk() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +bool(false) +===DONE===