]> granicus.if.org Git - php/commitdiff
Add tests for broken function arguments
authorHannes Magnusson <bjori@php.net>
Fri, 3 Jun 2011 17:12:59 +0000 (17:12 +0000)
committerHannes Magnusson <bjori@php.net>
Fri, 3 Jun 2011 17:12:59 +0000 (17:12 +0000)
Zend/tests/function_arguments_001.phpt [new file with mode: 0644]
Zend/tests/function_arguments_002.phpt [new file with mode: 0644]

diff --git a/Zend/tests/function_arguments_001.phpt b/Zend/tests/function_arguments_001.phpt
new file mode 100644 (file)
index 0000000..e506350
--- /dev/null
@@ -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 (file)
index 0000000..79dd31f
--- /dev/null
@@ -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
+