From b21f7778fb106a425467c7ee5819e544ef0a2de8 Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Sat, 29 Mar 2014 13:35:42 +0100 Subject: activated all tests, and slightly modified one test which has wrong expected output in the test script --- tests/php/phpt/variables/001-process_globals.phpt | 47 ++++++++++++ tests/php/phpt/variables/001-process_globals.phpt- | 47 ------------ .../php/phpt/variables/002-get_complex_array.phpt | 33 ++++++++ .../php/phpt/variables/002-get_complex_array.phpt- | 33 -------- tests/php/phpt/variables/008-value-arrays.phpt | 89 ++++++++++++++++++++++ tests/php/phpt/variables/008-value-arrays.phpt- | 89 ---------------------- tests/php/phpt/variables/009-value-object.phpt | 24 ++++++ tests/php/phpt/variables/009-value-object.phpt- | 24 ------ 8 files changed, 193 insertions(+), 193 deletions(-) create mode 100644 tests/php/phpt/variables/001-process_globals.phpt delete mode 100644 tests/php/phpt/variables/001-process_globals.phpt- create mode 100644 tests/php/phpt/variables/002-get_complex_array.phpt delete mode 100644 tests/php/phpt/variables/002-get_complex_array.phpt- create mode 100644 tests/php/phpt/variables/008-value-arrays.phpt delete mode 100644 tests/php/phpt/variables/008-value-arrays.phpt- create mode 100644 tests/php/phpt/variables/009-value-object.phpt delete mode 100644 tests/php/phpt/variables/009-value-object.phpt- diff --git a/tests/php/phpt/variables/001-process_globals.phpt b/tests/php/phpt/variables/001-process_globals.phpt new file mode 100644 index 0000000..022e99c --- /dev/null +++ b/tests/php/phpt/variables/001-process_globals.phpt @@ -0,0 +1,47 @@ +--TEST-- +Global variables in PHP-CPP +--DESCRIPTION-- +The author of the original: Jasper van Eck +--SKIPIF-- + +--FILEEOF-- + ---SKIPIF-- - ---FILEEOF-- - +--FILEEOF-- + 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 diff --git a/tests/php/phpt/variables/002-get_complex_array.phpt- b/tests/php/phpt/variables/002-get_complex_array.phpt- deleted file mode 100644 index f13afa6..0000000 --- a/tests/php/phpt/variables/002-get_complex_array.phpt- +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -get_complex_array ---SKIPIF-- - ---FILEEOF-- - 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 diff --git a/tests/php/phpt/variables/008-value-arrays.phpt b/tests/php/phpt/variables/008-value-arrays.phpt new file mode 100644 index 0000000..6950780 --- /dev/null +++ b/tests/php/phpt/variables/008-value-arrays.phpt @@ -0,0 +1,89 @@ +--TEST-- +Test Php::Value arrays +--DESCRIPTION-- +--SKIPIF-- + +--FILEEOF-- + + array ( + 0 => 'apple', + 1 => 'banana', + 2 => 'tomato', + ), + 'filled' => + array ( + 0 => 'a', + 1 => 'b', + 2 => 'c', + 3 => 'd', + ), + 'assoc' => + array ( + 'apple' => 'green', + 'banana' => 'yellow', + 'tomato' => 'green', + ), + 'assoc2' => + array ( + 'x' => 'info@example.com', + 'y' => NULL, + 'z' => 123, + ), + 'assoc3' => + array ( + 'x' => 'info@example.com', + 'y' => NULL, + 'z' => + array ( + 0 => 'a', + 1 => 'b', + 2 => 'c', + ), + ), +) \ No newline at end of file diff --git a/tests/php/phpt/variables/008-value-arrays.phpt- b/tests/php/phpt/variables/008-value-arrays.phpt- deleted file mode 100644 index 6950780..0000000 --- a/tests/php/phpt/variables/008-value-arrays.phpt- +++ /dev/null @@ -1,89 +0,0 @@ ---TEST-- -Test Php::Value arrays ---DESCRIPTION-- ---SKIPIF-- - ---FILEEOF-- - - array ( - 0 => 'apple', - 1 => 'banana', - 2 => 'tomato', - ), - 'filled' => - array ( - 0 => 'a', - 1 => 'b', - 2 => 'c', - 3 => 'd', - ), - 'assoc' => - array ( - 'apple' => 'green', - 'banana' => 'yellow', - 'tomato' => 'green', - ), - 'assoc2' => - array ( - 'x' => 'info@example.com', - 'y' => NULL, - 'z' => 123, - ), - 'assoc3' => - array ( - 'x' => 'info@example.com', - 'y' => NULL, - 'z' => - array ( - 0 => 'a', - 1 => 'b', - 2 => 'c', - ), - ), -) \ No newline at end of file diff --git a/tests/php/phpt/variables/009-value-object.phpt b/tests/php/phpt/variables/009-value-object.phpt new file mode 100644 index 0000000..c45cae8 --- /dev/null +++ b/tests/php/phpt/variables/009-value-object.phpt @@ -0,0 +1,24 @@ +--TEST-- +Test Php::Value object #1 +--DESCRIPTION-- + create empty object of type stdClass + object properties can be accessed with square brackets +--SKIPIF-- + +--FILEEOF-- + "value1", "property2" => "value2"); + +var_export($object); + + + +--EXPECT-- +stdClass::__set_state(array( + 'property1' => 'value1', + 'property2' => 'value2', +)) \ No newline at end of file diff --git a/tests/php/phpt/variables/009-value-object.phpt- b/tests/php/phpt/variables/009-value-object.phpt- deleted file mode 100644 index c45cae8..0000000 --- a/tests/php/phpt/variables/009-value-object.phpt- +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -Test Php::Value object #1 ---DESCRIPTION-- - create empty object of type stdClass - object properties can be accessed with square brackets ---SKIPIF-- - ---FILEEOF-- - "value1", "property2" => "value2"); - -var_export($object); - - - ---EXPECT-- -stdClass::__set_state(array( - 'property1' => 'value1', - 'property2' => 'value2', -)) \ No newline at end of file -- cgit v1.2.3