From: Felix De Vliegher Date: Tue, 15 Jul 2008 11:14:42 +0000 (+0000) Subject: Tests for strpbrk(), testfest.php.net task #91 and #92. X-Git-Tag: php-5.3.0alpha1~336 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0adb8c0b10c6599ebe90441f8f6965761c234374;p=php 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..23d59c2ff4 --- /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 *** +string(20) "is is a Simple text." +string(12) "Simple text." +bool(false) +bool(false) +bool(false) +string(12) " aaa aaaSLR" +string(1) "5" +string(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..85729ea112 --- /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, array given in %s on line %d +bool(false) + +Warning: strpbrk() expects parameter 1 to be string, array given in %s on line %d +bool(false) +===DONE===