summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Magnusson <bjori@php.net>2011-06-03 17:12:59 +0000
committerHannes Magnusson <bjori@php.net>2011-06-03 17:12:59 +0000
commita62829c09ea3f1defdf5e3e7c8793c1b7ee6cecc (patch)
tree1364eee9622cc4724a97fd307b22330d7e23a5b9
parent479a47d8af09175abd9e241f54d16a8652a70b3b (diff)
downloadphp-git-a62829c09ea3f1defdf5e3e7c8793c1b7ee6cecc.tar.gz
Add tests for broken function arguments
-rw-r--r--Zend/tests/function_arguments_001.phpt9
-rw-r--r--Zend/tests/function_arguments_002.phpt9
2 files changed, 18 insertions, 0 deletions
diff --git a/Zend/tests/function_arguments_001.phpt b/Zend/tests/function_arguments_001.phpt
new file mode 100644
index 0000000000..e506350269
--- /dev/null
+++ b/Zend/tests/function_arguments_001.phpt
@@ -0,0 +1,9 @@
+--TEST--
+Argument parsing error #001
+--FILE--
+<?php
+function foo($arg1 string) {}
+?>
+--EXPECTF--
+Parse error: syntax error, unexpected T_STRING, expecting ')' in %sfunction_arguments.php on line %d
+
diff --git a/Zend/tests/function_arguments_002.phpt b/Zend/tests/function_arguments_002.phpt
new file mode 100644
index 0000000000..79dd31f337
--- /dev/null
+++ b/Zend/tests/function_arguments_002.phpt
@@ -0,0 +1,9 @@
+--TEST--
+Argument parsing error #002
+--FILE--
+<?php
+function foo($arg1/) {}
+?>
+--EXPECTF--
+Parse error: syntax error, unexpected '/', expecting ')' in %sfunction_arguments_002.php on line %d
+