xref: /PHP-7.0/ext/intl/tests/locale_bug74439.phpt (revision 7dc6b04f)
1--TEST--
2Bug #74439 Wrong reflection on the Locale methods
3--SKIPIF--
4<?php if (!extension_loaded('intl')) die('skip intl extension not available'); ?>
5--FILE--
6<?php
7
8$methods = [
9'getDefault',
10'acceptFromHttp',
11'canonicalize',
12'composeLocale',
13'getAllVariants',
14'getKeywords',
15'getPrimaryLanguage',
16'getRegion',
17'getScript',
18'parseLocale',
19'setDefault',
20'getDisplayLanguage',
21'getDisplayName',
22'getDisplayRegion',
23'getDisplayScript',
24'getDisplayVariant',
25'filterMatches',
26'lookup',
27];
28
29foreach ($methods as $method) {
30    $rm = new ReflectionMethod(Locale::class, $method);
31    printf("%s: %d, %d\n", $method, $rm->getNumberOfParameters(), $rm->getNumberOfRequiredParameters());
32}
33?>
34===DONE===
35--EXPECT--
36getDefault: 0, 0
37acceptFromHttp: 1, 1
38canonicalize: 1, 1
39composeLocale: 1, 1
40getAllVariants: 1, 1
41getKeywords: 1, 1
42getPrimaryLanguage: 1, 1
43getRegion: 1, 1
44getScript: 1, 1
45parseLocale: 1, 1
46setDefault: 1, 1
47getDisplayLanguage: 2, 1
48getDisplayName: 2, 1
49getDisplayRegion: 2, 1
50getDisplayScript: 2, 1
51getDisplayVariant: 2, 1
52filterMatches: 3, 2
53lookup: 4, 2
54===DONE===
55