php-src/ext/standard/tests/array/max_error.phpt
Steph Fox 833f4150a1 - killed off UEXPECT
- could someone please fix var_export2.phpt? NUL is corrupted, can't fix here
2008-05-26 23:36:10 +00:00

34 lines
633 B
PHP

--TEST--
Test wrong number of arguments for min()
--FILE--
<?php
/*
* proto mixed min(mixed arg1 [, mixed arg2 [, mixed ...]])
* Function is implemented in ext/standard/array.c
*/
echo "\n*** Testing Error Conditions ***\n";
var_dump(max());
var_dump(max(1));
var_dump(max(array()));
var_dump(max(new stdclass));
?>
--EXPECTF--
*** Testing Error Conditions ***
Warning: max(): At least one %s on line %d
NULL
Warning: Wrong parameter count for max() in %s on line %d
NULL
Warning: max(): Array must contain at least one element in %s on line %d
bool(false)
Warning: Wrong parameter count for max() in %s on line %d
NULL