From: Raghubansh Kumar Date: Tue, 22 May 2007 16:03:57 +0000 (+0000) Subject: New version of basename_basic.phpt basename_error.phpt basename_variation.phpt X-Git-Tag: RELEASE_1_4~97 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d3630546558ee558bc66c151d7fa97be51c7465;p=php New version of basename_basic.phpt basename_error.phpt basename_variation.phpt --- diff --git a/ext/standard/tests/strings/basename_basic.phpt b/ext/standard/tests/strings/basename_basic.phpt new file mode 100644 index 0000000000..4a0159f08b --- /dev/null +++ b/ext/standard/tests/strings/basename_basic.phpt @@ -0,0 +1,272 @@ +--TEST-- +Test basename() function : basic functionality +--FILE-- + +--EXPECTF-- +*** Testing basic operations *** + +--Iteration 1-- +string(3) "bar" + +--Iteration 2-- +string(3) "bar" + +--Iteration 3-- +string(3) "bar" + +--Iteration 4-- +string(3) "bar" + +--Iteration 5-- +string(3) "bar" + +--Iteration 6-- +string(3) "bar" + +--Iteration 7-- +string(3) "bar" + +--Iteration 8-- +string(3) "bar" + +--Iteration 9-- +string(3) "bar" + +--Iteration 10-- +string(3) "bar" + +--Iteration 11-- +string(6) "bar.gz" + +--Iteration 12-- +string(3) "bar" + +--Iteration 13-- +string(3) "bar" + +--Iteration 14-- +string(3) "bar" + +--Iteration 15-- +string(3) "bar" + +--Iteration 16-- +string(3) "bar" + +--Iteration 17-- +string(3) "bar" + +--Iteration 18-- +string(3) "bar" + +--Iteration 19-- +string(3) "bar" + +--Iteration 20-- +string(3) ".gz" + +--Iteration 21-- +string(3) ".gz" + +--Iteration 22-- +string(3) ".gz" + +--Iteration 23-- +string(3) ".gz" + +--Iteration 24-- +string(3) ".gz" + +--Iteration 25-- +string(3) ".gz" + +--Iteration 26-- +string(3) "bar" + +--Iteration 27-- +string(3) "bar" + +--Iteration 28-- +string(3) "bar" + +--Iteration 29-- +string(3) "bar" + +--Iteration 30-- +string(3) "bar" + +--Iteration 31-- +string(3) "bar" + +--Iteration 32-- +string(6) "bar.gz" +Done +--UEXPECT-- +*** Testing basic operations *** + +--Iteration 1-- +unicode(3) "bar" + +--Iteration 2-- +unicode(3) "bar" + +--Iteration 3-- +unicode(3) "bar" + +--Iteration 4-- +unicode(3) "bar" + +--Iteration 5-- +unicode(3) "bar" + +--Iteration 6-- +unicode(3) "bar" + +--Iteration 7-- +unicode(3) "bar" + +--Iteration 8-- +unicode(3) "bar" + +--Iteration 9-- +unicode(3) "bar" + +--Iteration 10-- +unicode(3) "bar" + +--Iteration 11-- +unicode(6) "bar.gz" + +--Iteration 12-- +unicode(3) "bar" + +--Iteration 13-- +unicode(3) "bar" + +--Iteration 14-- +unicode(3) "bar" + +--Iteration 15-- +unicode(3) "bar" + +--Iteration 16-- +unicode(3) "bar" + +--Iteration 17-- +unicode(3) "bar" + +--Iteration 18-- +unicode(3) "bar" + +--Iteration 19-- +unicode(3) "bar" + +--Iteration 20-- +unicode(3) ".gz" + +--Iteration 21-- +unicode(3) ".gz" + +--Iteration 22-- +unicode(3) ".gz" + +--Iteration 23-- +unicode(3) ".gz" + +--Iteration 24-- +unicode(3) ".gz" + +--Iteration 25-- +unicode(3) ".gz" + +--Iteration 26-- +string(3) "bar" + +--Iteration 27-- +string(3) "bar" + +--Iteration 28-- +string(3) "bar" + +--Iteration 29-- +string(3) "bar" + +--Iteration 30-- +string(3) "bar" + +--Iteration 31-- +string(3) "bar" + +--Iteration 32-- +string(6) "bar.gz" +Done \ No newline at end of file diff --git a/ext/standard/tests/strings/basename_error.phpt b/ext/standard/tests/strings/basename_error.phpt new file mode 100644 index 0000000000..ba4d6ebd8b --- /dev/null +++ b/ext/standard/tests/strings/basename_error.phpt @@ -0,0 +1,88 @@ +--TEST-- +Test basename() function : error conditions +--FILE-- + +--EXPECTF-- +*** Testing error conditions *** + +Warning: basename() expects at least 1 parameter, 0 given in %s on line %d +NULL + +Warning: basename() expects at most 2 parameters, 3 given in %s on line %d +NULL + +Warning: basename() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL + +Warning: basename() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL + +Warning: basename() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d +NULL + +Warning: basename() expects parameter 1 to be string (Unicode or binary), object given in %s on line %d +NULL + +Warning: basename() expects parameter 1 to be string (Unicode or binary), object given in %s on line %d +NULL + +Warning: basename() expects parameter 1 to be string (Unicode or binary), object given in %s on line %d +NULL + +Warning: basename() expects parameter 2 to be string (Unicode or binary), object given in %s on line %d +NULL +Done +--UEXPECTF-- +*** Testing error conditions *** + +Warning: basename() expects at least 1 parameter, 0 given in %s on line %d +NULL + +Warning: basename() expects at most 2 parameters, 3 given in %s on line %d +NULL + +Warning: basename() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL + +Warning: basename() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL + +Warning: basename() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d +NULL + +Warning: basename() expects parameter 1 to be string (Unicode or binary), object given in %s on line %d +NULL + +Warning: basename() expects parameter 1 to be string (Unicode or binary), object given in %s on line %d +NULL + +Warning: basename() expects parameter 1 to be string (Unicode or binary), object given in %s on line %d +NULL + +Warning: basename() expects parameter 2 to be string (Unicode or binary), object given in %s on line %d +NULL +Done diff --git a/ext/standard/tests/strings/basename_variation.phpt b/ext/standard/tests/strings/basename_variation.phpt new file mode 100644 index 0000000000..b957bb9f83 --- /dev/null +++ b/ext/standard/tests/strings/basename_variation.phpt @@ -0,0 +1,382 @@ +--TEST-- +Test basename() function : usage variations +--FILE-- +