mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
Add tests for broken function arguments
This commit is contained in:
parent
52e353e973
commit
2b22017e8f
2 changed files with 18 additions and 0 deletions
9
Zend/tests/function_arguments_001.phpt
Normal file
9
Zend/tests/function_arguments_001.phpt
Normal file
|
@ -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
|
||||
|
9
Zend/tests/function_arguments_002.phpt
Normal file
9
Zend/tests/function_arguments_002.phpt
Normal file
|
@ -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
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue