diff options
Diffstat (limited to 'ext/date/tests/microtime_error.phpt')
-rw-r--r-- | ext/date/tests/microtime_error.phpt | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/ext/date/tests/microtime_error.phpt b/ext/date/tests/microtime_error.phpt deleted file mode 100644 index ce13875e67..0000000000 --- a/ext/date/tests/microtime_error.phpt +++ /dev/null @@ -1,56 +0,0 @@ ---TEST-- -Test wrong number of arguments for microtime() ---FILE-- -<?php -/* - * Function is implemented in ext/standard/microtime.c -*/ - -echo "\n-- Bad Arg types --\n"; - -$bad_args = array(null, - 1.5, - "hello", - array('k'=>'v', array(0)), - new stdClass, - 1); -foreach ($bad_args as $bad_arg) { - echo "\n--> bad arg: "; - var_dump($bad_arg); - try { - var_dump(microtime($bad_arg)); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -} - -?> ---EXPECTF-- --- Bad Arg types -- - ---> bad arg: NULL -string(%d) "%s %s" - ---> bad arg: float(1.5) -float(%s) - ---> bad arg: string(5) "hello" -float(%s) - ---> bad arg: array(2) { - ["k"]=> - string(1) "v" - [0]=> - array(1) { - [0]=> - int(0) - } -} -microtime(): Argument #1 ($as_float) must be of type bool, array given - ---> bad arg: object(stdClass)#%d (0) { -} -microtime(): Argument #1 ($as_float) must be of type bool, stdClass given - ---> bad arg: int(1) -float(%s) |