summaryrefslogtreecommitdiff
path: root/tests/php/phpt/variables/002-get_complex_array.phpt-
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-26 23:18:16 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-26 23:18:16 +0100
commitc0e1f20eeab6445d6355ea11ef7d264cb37c52cf (patch)
treeb71ea107aa058a6585fc2e83a4319075638c0698 /tests/php/phpt/variables/002-get_complex_array.phpt-
parent702c95cf779226550af6b33255a8e1b28ccca428 (diff)
parent0c33b75e4adf790066091f402d70272a80d0ce59 (diff)
Merge pull request #54 from valmat/tests1
Added new tests.
Diffstat (limited to 'tests/php/phpt/variables/002-get_complex_array.phpt-')
-rw-r--r--tests/php/phpt/variables/002-get_complex_array.phpt-33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/php/phpt/variables/002-get_complex_array.phpt- b/tests/php/phpt/variables/002-get_complex_array.phpt-
new file mode 100644
index 0000000..f13afa6
--- /dev/null
+++ b/tests/php/phpt/variables/002-get_complex_array.phpt-
@@ -0,0 +1,33 @@
+--TEST--
+get_complex_array
+--SKIPIF--
+<?php if (!extension_loaded("extension_for_tests")) print "skip"; ?>
+--FILEEOF--
+<?php
+
+/*
+function get_complex_array()
+{
+ return array(
+ "a" => 123,
+ "b" => 456,
+ "c" => array("nested_value","example",7)
+ );
+}
+var_export(get_complex_array());
+*/
+var_export(TestVariables\get_complex_array());
+
+
+echo PHP_EOL;
+--EXPECT--
+array (
+ 'a' => 123,
+ 'b' => 456,
+ 'c' =>
+ array (
+ 0 => 'nested_value',
+ 1 => 'example',
+ 2 => 7,
+ ),
+) \ No newline at end of file