xref: /PHP-5.5/ext/intl/tests/badargs.phpt (revision 42685040)
1--TEST--
2Check that bad arguments return the same
3--SKIPIF--
4<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
5--FILE--
6<?php
7$funcs = get_extension_funcs("intl");
8function ignore_err() {}
9set_error_handler("ignore_err");
10$arg = new stdClass();
11foreach($funcs as $func) {
12        $rfunc = new ReflectionFunction($func);
13        if($rfunc->getNumberOfRequiredParameters() == 0) {
14                continue;
15        }
16
17		try {
18			$res = $func($arg);
19		} catch (Exception $e) { continue; }
20        if($res != false) {
21                echo "$func: ";
22                var_dump($res);
23        }
24}
25echo "OK!\n";
26?>
27--EXPECT--
28OK!
29