From 67a7756d86f5942dd716b6b287d9bc57cef70c97 Mon Sep 17 00:00:00 2001 From: Josie Messa Date: Thu, 14 Feb 2008 16:09:18 +0000 Subject: [PATCH] - New variation test for array_values() --- .../tests/array/array_values_variation7.phpt | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 ext/standard/tests/array/array_values_variation7.phpt diff --git a/ext/standard/tests/array/array_values_variation7.phpt b/ext/standard/tests/array/array_values_variation7.phpt new file mode 100644 index 0000000000..2c724604ca --- /dev/null +++ b/ext/standard/tests/array/array_values_variation7.phpt @@ -0,0 +1,82 @@ +--TEST-- +Test array_values() function : usage variations - Internal order check +--FILE-- + 'three', 2 => 'two', 1 => 'one', 0 => 'zero'); + +echo "\n-- \$input argument: --\n"; +var_dump($input); + +echo "\n-- Result of array_values() --\n"; +var_dump(array_values($input)); + +echo "Done"; +?> + +--EXPECTF-- +*** Testing array_values() : usage variations *** + +-- $input argument: -- +array(4) { + [3]=> + string(5) "three" + [2]=> + string(3) "two" + [1]=> + string(3) "one" + [0]=> + string(4) "zero" +} + +-- Result of array_values() -- +array(4) { + [0]=> + string(5) "three" + [1]=> + string(3) "two" + [2]=> + string(3) "one" + [3]=> + string(4) "zero" +} +Done +--UEXPECTF-- +*** Testing array_values() : usage variations *** + +-- $input argument: -- +array(4) { + [3]=> + unicode(5) "three" + [2]=> + unicode(3) "two" + [1]=> + unicode(3) "one" + [0]=> + unicode(4) "zero" +} + +-- Result of array_values() -- +array(4) { + [0]=> + unicode(5) "three" + [1]=> + unicode(3) "two" + [2]=> + unicode(3) "one" + [3]=> + unicode(4) "zero" +} +Done \ No newline at end of file -- 2.50.1