From: Raghubansh Kumar Date: Fri, 14 Sep 2007 19:10:04 +0000 (+0000) Subject: Removing from file dir as it was wrongly committed to this dir X-Git-Tag: RELEASE_2_0_0a1~1809 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=35405b401afed525a85a8784198ee5c5a1a2f27b;p=php Removing from file dir as it was wrongly committed to this dir --- diff --git a/ext/standard/tests/file/wordwrap_basic.phpt b/ext/standard/tests/file/wordwrap_basic.phpt deleted file mode 100644 index eb5e9a3659..0000000000 --- a/ext/standard/tests/file/wordwrap_basic.phpt +++ /dev/null @@ -1,57 +0,0 @@ ---TEST-- -Test wordwrap() function : basic functionality ---FILE-- -\n'; - -// Calling wordwrap() with default arguments -var_dump( wordwrap($str) ); - -// Calling wordwrap() with all possible optional arguments -// with $width arg -var_dump( wordwrap($str, $width) ); -// with $break arg -var_dump( wordwrap($str, $width, $break) ); - -// Calling wordwrap() with all arguments -// $cut as true -$width = 10; -$cut = true; -var_dump( wordwrap($str, $width, $break, $cut) ); - -// $cut as false -$width = 10; -$cut = false; -var_dump( wordwrap($str, $width, $break, $cut) ); -echo "Done\n"; -?> ---EXPECTF-- -*** Testing wordwrap() : basic functionality *** -string(96) "The quick brown foooooooooox jummmmmmmmmmmmped over the lazzzzzzzzzzzy -doooooooooooooooooooooog." -string(96) "The quick brown foooooooooox jummmmmmmmmmmmped over the lazzzzzzzzzzzy -doooooooooooooooooooooog." -string(103) "The quick brown foooooooooox jummmmmmmmmmmmped over the lazzzzzzzzzzzy
\ndoooooooooooooooooooooog." -string(178) "The quick
\nbrown
\nfooooooooo
\nox
\njummmmmmmm
\nmmmmped
\nover the
\nlazzzzzzzz
\nzzzy
\ndooooooooo
\noooooooooo
\nooog." -string(138) "The quick
\nbrown
\nfoooooooooox
\njummmmmmmmmmmmped
\nover the
\nlazzzzzzzzzzzy
\ndoooooooooooooooooooooog." -Done ---UEXPECTF-- -*** Testing wordwrap() : basic functionality *** -string(96) "The quick brown foooooooooox jummmmmmmmmmmmped over the lazzzzzzzzzzzy -doooooooooooooooooooooog." -string(96) "The quick brown foooooooooox jummmmmmmmmmmmped over the lazzzzzzzzzzzy -doooooooooooooooooooooog." -string(103) "The quick brown foooooooooox jummmmmmmmmmmmped over the lazzzzzzzzzzzy
\ndoooooooooooooooooooooog." -string(178) "The quick
\nbrown
\nfooooooooo
\nox
\njummmmmmmm
\nmmmmped
\nover the
\nlazzzzzzzz
\nzzzy
\ndooooooooo
\noooooooooo
\nooog." -string(138) "The quick
\nbrown
\nfoooooooooox
\njummmmmmmmmmmmped
\nover the
\nlazzzzzzzzzzzy
\ndoooooooooooooooooooooog." -Done diff --git a/ext/standard/tests/file/wordwrap_error.phpt b/ext/standard/tests/file/wordwrap_error.phpt deleted file mode 100644 index f3b941f024..0000000000 --- a/ext/standard/tests/file/wordwrap_error.phpt +++ /dev/null @@ -1,103 +0,0 @@ ---TEST-- -Test wordwrap() function : error conditions ---FILE-- -\n'; -$cut = true; -$extra_arg = "extra_arg"; - -var_dump( wordwrap($str, $width, $break, $cut, $extra_arg) ); - -// $width arg as negative value -echo "\n-- Testing wordwrap() function with negative/zero value for width argument --\n"; -echo "-- width = 0 & cut = false --\n"; -// width as zero and cut as false -$width = 0; -$cut = false; -var_dump( wordwrap($str, $width, $break, $cut) ); - -echo "-- width = 0 & cut = true --\n"; -// width as zero and cut as true -$width = 0; -$cut = true; -var_dump( wordwrap($str, $width, $break, $cut) ); - -echo "-- width = -10 & cut = false --\n"; -// width as -ne and cut as false -$width = -10; -$cut = false; -var_dump( wordwrap($str, $width, $break, $cut) ); - -echo "-- width = -10 & cut = true --\n"; -// width as -ne and cut as true -$width = -10; -$cut = false; -var_dump( wordwrap($str, $width, $break, $cut) ); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing wordwrap() : error conditions *** - --- Testing wordwrap() function with Zero arguments -- - -Warning: wordwrap() expects at least 1 parameter, 0 given in %s on line %d%d -NULL - --- Testing wordwrap() function with more than expected no. of arguments -- - -Warning: wordwrap() expects at most 4 parameters, 5 given in %s on line %d%d -NULL - --- Testing wordwrap() function with negative/zero value for width argument -- --- width = 0 & cut = false -- -string(39) "testing
\nwordwrap
\nfunction" --- width = 0 & cut = true -- - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d%d -bool(false) --- width = -10 & cut = false -- -string(39) "testing
\nwordwrap
\nfunction" --- width = -10 & cut = true -- -string(39) "testing
\nwordwrap
\nfunction" -Done ---UEXPECTF-- -*** Testing wordwrap() : error conditions *** - --- Testing wordwrap() function with Zero arguments -- - -Warning: wordwrap() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing wordwrap() function with more than expected no. of arguments -- - -Warning: wordwrap() expects at most 4 parameters, 5 given in %s on line %d -NULL - --- Testing wordwrap() function with negative/zero value for width argument -- --- width = 0 & cut = false -- -string(39) "testing
\nwordwrap
\nfunction" --- width = 0 & cut = true -- - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- width = -10 & cut = false -- -string(39) "testing
\nwordwrap
\nfunction" --- width = -10 & cut = true -- -string(39) "testing
\nwordwrap
\nfunction" -Done diff --git a/ext/standard/tests/file/wordwrap_variation1.phpt b/ext/standard/tests/file/wordwrap_variation1.phpt deleted file mode 100644 index 83e73b73ca..0000000000 --- a/ext/standard/tests/file/wordwrap_variation1.phpt +++ /dev/null @@ -1,566 +0,0 @@ ---TEST-- -Test wordwrap() function : usage variations - unexpected values for str argument ---FILE-- -\n'; -$cut = true; - -// resource variable -$fp = fopen(__FILE__, "r"); - -// get an unset variable -$unset_var = 'string_val'; -unset($unset_var); - -// array with different values -$values = array ( - - // integer values - 0, - 1, - 12345, - -2345, - - // float values - 10.5, - -10.5, - 10.5e10, - 10.6E-10, - .5, - - // array values - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new stdclass(), - - // Null - NULL, - null, - - // empty string - "", - '', - - // resource variable - $fp, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - -// loop though each element of the array and check the working of wordwrap() -// when $str arugment is supplied with different values -echo "\n--- Testing wordwrap() by supplying different values for 'str' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str = $values [$index]; - - var_dump( wordwrap($str) ); - var_dump( wordwrap($str, $width) ); - var_dump( wordwrap($str, $width, $break) ); - - // $cut as false - $cut = false; - var_dump( wordwrap($str, $width, $break, $cut) ); - - // $cut as true - $cut = true; - var_dump( wordwrap($str, $width, $break, $cut) ); - - $counter ++; -} - -// close the resource -fclose($fp); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing wordwrap() : usage variations *** - ---- Testing wordwrap() by supplying different values for 'str' argument --- --- Iteration 1 -- -string(1) "0" -string(1) "0" -string(1) "0" -string(1) "0" -string(1) "0" --- Iteration 2 -- -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" --- Iteration 3 -- -string(5) "12345" -string(5) "12345" -string(5) "12345" -string(5) "12345" -string(13) "123
\n45" --- Iteration 4 -- -string(5) "-2345" -string(5) "-2345" -string(5) "-2345" -string(5) "-2345" -string(13) "-23
\n45" --- Iteration 5 -- -string(4) "10.5" -string(4) "10.5" -string(4) "10.5" -string(4) "10.5" -string(12) "10.
\n5" --- Iteration 6 -- -string(5) "-10.5" -string(5) "-10.5" -string(5) "-10.5" -string(5) "-10.5" -string(13) "-10
\n.5" --- Iteration 7 -- -string(12) "105000000000" -string(12) "105000000000" -string(12) "105000000000" -string(12) "105000000000" -string(36) "105
\n000
\n000
\n000" --- Iteration 8 -- -string(7) "1.06E-9" -string(7) "1.06E-9" -string(7) "1.06E-9" -string(7) "1.06E-9" -string(23) "1.0
\n6E-
\n9" --- Iteration 9 -- -string(3) "0.5" -string(3) "0.5" -string(3) "0.5" -string(3) "0.5" -string(3) "0.5" --- Iteration 10 -- - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" --- Iteration 16 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 17 -- -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" --- Iteration 18 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 19 -- - -Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d -NULL --- Iteration 20 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 21 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 22 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 23 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 24 -- - -Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 25 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 26 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" -Done ---UEXPECTF-- -*** Testing wordwrap() : usage variations *** - ---- Testing wordwrap() by supplying different values for 'str' argument --- --- Iteration 1 -- -string(1) "0" -string(1) "0" -string(1) "0" -string(1) "0" -string(1) "0" --- Iteration 2 -- -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" --- Iteration 3 -- -string(5) "12345" -string(5) "12345" -string(5) "12345" -string(5) "12345" -string(13) "123
\n45" --- Iteration 4 -- -string(5) "-2345" -string(5) "-2345" -string(5) "-2345" -string(5) "-2345" -string(13) "-23
\n45" --- Iteration 5 -- -string(4) "10.5" -string(4) "10.5" -string(4) "10.5" -string(4) "10.5" -string(12) "10.
\n5" --- Iteration 6 -- -string(5) "-10.5" -string(5) "-10.5" -string(5) "-10.5" -string(5) "-10.5" -string(13) "-10
\n.5" --- Iteration 7 -- -string(12) "105000000000" -string(12) "105000000000" -string(12) "105000000000" -string(12) "105000000000" -string(36) "105
\n000
\n000
\n000" --- Iteration 8 -- -string(7) "1.06E-9" -string(7) "1.06E-9" -string(7) "1.06E-9" -string(7) "1.06E-9" -string(23) "1.0
\n6E-
\n9" --- Iteration 9 -- -string(3) "0.5" -string(3) "0.5" -string(3) "0.5" -string(3) "0.5" -string(3) "0.5" --- Iteration 10 -- - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d -NULL --- Iteration 15 -- -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" --- Iteration 16 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 17 -- -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" --- Iteration 18 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 19 -- - -Warning: wordwrap() expects parameter 1 to be binary string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, object given in %s on line %d -NULL --- Iteration 20 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 21 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 22 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 23 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 24 -- - -Warning: wordwrap() expects parameter 1 to be binary string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be binary string, resource given in %s on line %d -NULL --- Iteration 25 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 26 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" -Done diff --git a/ext/standard/tests/file/wordwrap_variation2.phpt b/ext/standard/tests/file/wordwrap_variation2.phpt deleted file mode 100644 index bf600c3c35..0000000000 --- a/ext/standard/tests/file/wordwrap_variation2.phpt +++ /dev/null @@ -1,579 +0,0 @@ ---TEST-- -Test wordwrap() function : usage variations - unexpected values for width argument ---FILE-- -\n'; -$cut = true; - -// resource var -$fp = fopen(__FILE__, "r"); - -// get an unset variable -$unset_var = 10; -unset($unset_var); - - -// array with different values as width -$values = array ( - // zerovalue for width - 0, - - // -ne value for width - -1, - -10, - - // array values - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // string values - "string", - 'string', - - // objects - new stdclass(), - - // Null value - NULL, - null, - - // empty string - "", - '', - - // resource variable - $fp, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - - -// loop though each element of the array and check the working of wordwrap() -// when $width arugment is supplied with different values -echo "\n--- Testing wordwrap() by supplying different values for 'width' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $width = $values [$index]; - - var_dump( wordwrap($str, $width) ); - var_dump( wordwrap($str, $width, $break) ); - - // cut as false - $cut = false; - var_dump( wordwrap($str, $width, $break, $cut) ); - - // cut as true - $cut = true; - var_dump( wordwrap($str, $width, $break, $cut) ); - - $counter ++; -} - -// close the resource -fclose($fp); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing wordwrap() : usage variations *** - ---- Testing wordwrap() by supplying different values for 'width' argument --- --- Iteration 1 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 2 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" -string(223) "
\nt
\ne
\ns
\nt
\ni
\nn
\ng
\n
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\n
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" --- Iteration 3 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" -string(223) "
\nt
\ne
\ns
\nt
\ni
\nn
\ng
\n
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\n
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" --- Iteration 4 -- - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL --- Iteration 5 -- - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL --- Iteration 6 -- - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL --- Iteration 7 -- - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL --- Iteration 8 -- - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL --- Iteration 9 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" -string(199) "t
\ne
\ns
\nt
\ni
\nn
\ng
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" --- Iteration 10 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 11 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" -string(199) "t
\ne
\ns
\nt
\ni
\nn
\ng
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" --- Iteration 12 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 13 -- - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL --- Iteration 14 -- - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL --- Iteration 15 -- - -Warning: wordwrap() expects parameter 2 to be long, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, object given in %s on line %d -NULL --- Iteration 16 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 17 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 18 -- - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: wordwrap() expects parameter 2 to be long, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, resource given in %s on line %d -NULL --- Iteration 21 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 22 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) -Done ---UEXPECTF-- -*** Testing wordwrap() : usage variations *** - ---- Testing wordwrap() by supplying different values for 'width' argument --- --- Iteration 1 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 2 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" -string(223) "
\nt
\ne
\ns
\nt
\ni
\nn
\ng
\n
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\n
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" --- Iteration 3 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" -string(223) "
\nt
\ne
\ns
\nt
\ni
\nn
\ng
\n
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\n
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" --- Iteration 4 -- - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL --- Iteration 5 -- - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL --- Iteration 6 -- - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL --- Iteration 7 -- - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL --- Iteration 8 -- - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL --- Iteration 9 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" -string(199) "t
\ne
\ns
\nt
\ni
\nn
\ng
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" --- Iteration 10 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 11 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" -string(199) "t
\ne
\ns
\nt
\ni
\nn
\ng
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" --- Iteration 12 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 13 -- - -Warning: wordwrap() expects parameter 2 to be long, Unicode string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, Unicode string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, Unicode string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, Unicode string given in %s on line %d -NULL --- Iteration 14 -- - -Warning: wordwrap() expects parameter 2 to be long, Unicode string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, Unicode string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, Unicode string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, Unicode string given in %s on line %d -NULL --- Iteration 15 -- - -Warning: wordwrap() expects parameter 2 to be long, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, object given in %s on line %d -NULL --- Iteration 16 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 17 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 18 -- - -Warning: wordwrap() expects parameter 2 to be long, Unicode string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, Unicode string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, Unicode string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, Unicode string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: wordwrap() expects parameter 2 to be long, Unicode string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, Unicode string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, Unicode string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, Unicode string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: wordwrap() expects parameter 2 to be long, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, resource given in %s on line %d -NULL --- Iteration 21 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 22 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) -Done diff --git a/ext/standard/tests/file/wordwrap_variation3.phpt b/ext/standard/tests/file/wordwrap_variation3.phpt deleted file mode 100644 index 2aab85b30b..0000000000 --- a/ext/standard/tests/file/wordwrap_variation3.phpt +++ /dev/null @@ -1,501 +0,0 @@ ---TEST-- -Test wordwrap() function : usage variations - unexptected values for break argument ---INI-- ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new stdclass(), - - // empty string - "", - '', - - //Null - NULL, - null, - - // resource var - $fp, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - -// loop though each element of the array and check the working of wordwrap() -// when $break arugment is supplied with different values -echo "\n--- Testing wordwrap() by supplying different values for 'break' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $break = $values [$index]; - - var_dump( wordwrap($str, $width, $break) ); - - // $cut as false - $cut = false; - var_dump( wordwrap($str, $width, $break, $cut) ); - - // $cut as true - $cut = true; - var_dump( wordwrap($str, $width, $break, $cut) ); - - $counter ++; -} - -// close the resource used -fclose($fp); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing wordwrap() : usage variations *** - ---- Testing wordwrap() by supplying different values for 'break' argument --- --- Iteration 1 -- -string(25) "testing0wordwrap0function" -string(25) "testing0wordwrap0function" -string(25) "testing0wordwrap0function" --- Iteration 2 -- -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" --- Iteration 3 -- -string(33) "testing12345wordwrap12345function" -string(33) "testing12345wordwrap12345function" -string(33) "testing12345wordwrap12345function" --- Iteration 4 -- -string(33) "testing-2345wordwrap-2345function" -string(33) "testing-2345wordwrap-2345function" -string(33) "testing-2345wordwrap-2345function" --- Iteration 5 -- -string(31) "testing10.5wordwrap10.5function" -string(31) "testing10.5wordwrap10.5function" -string(31) "testing10.5wordwrap10.5function" --- Iteration 6 -- -string(33) "testing-10.5wordwrap-10.5function" -string(33) "testing-10.5wordwrap-10.5function" -string(33) "testing-10.5wordwrap-10.5function" --- Iteration 7 -- -string(47) "testing105000000000wordwrap105000000000function" -string(47) "testing105000000000wordwrap105000000000function" -string(47) "testing105000000000wordwrap105000000000function" --- Iteration 8 -- -string(37) "testing1.06E-9wordwrap1.06E-9function" -string(37) "testing1.06E-9wordwrap1.06E-9function" -string(37) "testing1.06E-9wordwrap1.06E-9function" --- Iteration 9 -- -string(29) "testing0.5wordwrap0.5function" -string(29) "testing0.5wordwrap0.5function" -string(29) "testing0.5wordwrap0.5function" --- Iteration 10 -- - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" --- Iteration 16 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 17 -- -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" --- Iteration 18 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 19 -- - -Warning: wordwrap() expects parameter 3 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, object given in %s on line %d -NULL --- Iteration 20 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 21 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 22 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 23 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 24 -- - -Warning: wordwrap() expects parameter 3 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, resource given in %s on line %d -NULL --- Iteration 25 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 26 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) -Done ---UEXPECTF-- -*** Testing wordwrap() : usage variations *** - ---- Testing wordwrap() by supplying different values for 'break' argument --- --- Iteration 1 -- -string(25) "testing0wordwrap0function" -string(25) "testing0wordwrap0function" -string(25) "testing0wordwrap0function" --- Iteration 2 -- -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" --- Iteration 3 -- -string(33) "testing12345wordwrap12345function" -string(33) "testing12345wordwrap12345function" -string(33) "testing12345wordwrap12345function" --- Iteration 4 -- -string(33) "testing-2345wordwrap-2345function" -string(33) "testing-2345wordwrap-2345function" -string(33) "testing-2345wordwrap-2345function" --- Iteration 5 -- -string(31) "testing10.5wordwrap10.5function" -string(31) "testing10.5wordwrap10.5function" -string(31) "testing10.5wordwrap10.5function" --- Iteration 6 -- -string(33) "testing-10.5wordwrap-10.5function" -string(33) "testing-10.5wordwrap-10.5function" -string(33) "testing-10.5wordwrap-10.5function" --- Iteration 7 -- -string(47) "testing105000000000wordwrap105000000000function" -string(47) "testing105000000000wordwrap105000000000function" -string(47) "testing105000000000wordwrap105000000000function" --- Iteration 8 -- -string(37) "testing1.06E-9wordwrap1.06E-9function" -string(37) "testing1.06E-9wordwrap1.06E-9function" -string(37) "testing1.06E-9wordwrap1.06E-9function" --- Iteration 9 -- -string(29) "testing0.5wordwrap0.5function" -string(29) "testing0.5wordwrap0.5function" -string(29) "testing0.5wordwrap0.5function" --- Iteration 10 -- - -Warning: wordwrap() expects parameter 3 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be binary string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: wordwrap() expects parameter 3 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be binary string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: wordwrap() expects parameter 3 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be binary string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: wordwrap() expects parameter 3 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be binary string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: wordwrap() expects parameter 3 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be binary string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be binary string, array given in %s on line %d -NULL --- Iteration 15 -- -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" --- Iteration 16 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 17 -- -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" --- Iteration 18 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 19 -- - -Warning: wordwrap() expects parameter 3 to be binary string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be binary string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be binary string, object given in %s on line %d -NULL --- Iteration 20 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 21 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 22 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 23 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 24 -- - -Warning: wordwrap() expects parameter 3 to be binary string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be binary string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be binary string, resource given in %s on line %d -NULL --- Iteration 25 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 26 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) -Done diff --git a/ext/standard/tests/file/wordwrap_variation4.phpt b/ext/standard/tests/file/wordwrap_variation4.phpt deleted file mode 100644 index 4a801aa51d..0000000000 --- a/ext/standard/tests/file/wordwrap_variation4.phpt +++ /dev/null @@ -1,203 +0,0 @@ ---TEST-- -Test wordwrap() function : usage variations - unexptected value for cut argument ---FILE-- -\n'; - -// get an unset variable -$unset_var = true; -unset($unset_var); - -// resource variable -$fp = fopen(__FILE__, "r"); - -// array with different values -$values = array ( - - // integer values - 0, - 1, - 12345, - -2345, - - // float values - 10.5, - -10.5, - 10.5e10, - 10.6E-10, - .5, - - // array values - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // string values - "string", - 'string', - - // objects - new stdclass(), - - // empty string - "", - '', - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - -// loop though each element of the array and check the working of wordwrap() -// when $cut arugment is supplied with different values -echo "\n--- Testing wordwrap() by supplying different values for 'cut' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $cut = $values [$index]; - - var_dump( wordwrap($str, $width, $break, $cut) ); - - $counter ++; -} - -// close the resource -fclose($fp); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing wordwrap() : usage variations *** - ---- Testing wordwrap() by supplying different values for 'cut' argument --- --- Iteration 1 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 2 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 3 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 4 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 5 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 6 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 7 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 8 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 9 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 10 -- - -Warning: wordwrap() expects parameter 4 to be boolean, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: wordwrap() expects parameter 4 to be boolean, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: wordwrap() expects parameter 4 to be boolean, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: wordwrap() expects parameter 4 to be boolean, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: wordwrap() expects parameter 4 to be boolean, array given in %s on line %d -NULL --- Iteration 15 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 16 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 17 -- - -Warning: wordwrap() expects parameter 4 to be boolean, object given in %s on line %d -NULL --- Iteration 18 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 19 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 20 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 21 -- -string(39) "testing
\nwordwrap
\nfunction" -Done ---UEXPECTF-- -*** Testing wordwrap() : usage variations *** - ---- Testing wordwrap() by supplying different values for 'cut' argument --- --- Iteration 1 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 2 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 3 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 4 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 5 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 6 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 7 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 8 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 9 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 10 -- - -Warning: wordwrap() expects parameter 4 to be boolean, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: wordwrap() expects parameter 4 to be boolean, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: wordwrap() expects parameter 4 to be boolean, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: wordwrap() expects parameter 4 to be boolean, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: wordwrap() expects parameter 4 to be boolean, array given in %s on line %d -NULL --- Iteration 15 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 16 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 17 -- - -Warning: wordwrap() expects parameter 4 to be boolean, object given in %s on line %d -NULL --- Iteration 18 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 19 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 20 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 21 -- -string(39) "testing
\nwordwrap
\nfunction" -Done diff --git a/ext/standard/tests/file/wordwrap_variation5.phpt b/ext/standard/tests/file/wordwrap_variation5.phpt deleted file mode 100644 index f801741690..0000000000 --- a/ext/standard/tests/file/wordwrap_variation5.phpt +++ /dev/null @@ -1,78 +0,0 @@ ---TEST-- -Test wordwrap() function : usage variations - valid break arguments(spaces) ---FILE-- - ---EXPECTF-- -*** Testing wordwrap() : usage variations *** - --- Testing wordwrap() with default break value and single space as value -- --- with default break and cut value -- -string(25) "Testing -wordwrap -function" --- with default cut value -- -string(25) "Testing wordwrap function" -string(27) "Testing wordwrap function" --- with cut value as false -- -string(25) "Testing wordwrap function" -string(27) "Testing wordwrap function" --- with cut value as true -- -string(45) "T e s t i n g w o r d w r a p f u n c t i o n" -string(67) "T e s t i n g w o r d w r a p f u n c t i o n" -Done ---UEXPECTF-- -*** Testing wordwrap() : usage variations *** - --- Testing wordwrap() with default break value and single space as value -- --- with default break and cut value -- -string(25) "Testing -wordwrap -function" --- with default cut value -- -string(25) "Testing wordwrap function" -string(27) "Testing wordwrap function" --- with cut value as false -- -string(25) "Testing wordwrap function" -string(27) "Testing wordwrap function" --- with cut value as true -- -string(45) "T e s t i n g w o r d w r a p f u n c t i o n" -string(67) "T e s t i n g w o r d w r a p f u n c t i o n" -Done