xref: /php-src/ext/intl/tests/locale_bug74439.phpt (revision 74859783)
1--TEST--
2Bug #74439 Wrong reflection on the Locale methods
3--EXTENSIONS--
4intl
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--EXPECT--
35getDefault: 0, 0
36acceptFromHttp: 1, 1
37canonicalize: 1, 1
38composeLocale: 1, 1
39getAllVariants: 1, 1
40getKeywords: 1, 1
41getPrimaryLanguage: 1, 1
42getRegion: 1, 1
43getScript: 1, 1
44parseLocale: 1, 1
45setDefault: 1, 1
46getDisplayLanguage: 2, 1
47getDisplayName: 2, 1
48getDisplayRegion: 2, 1
49getDisplayScript: 2, 1
50getDisplayVariant: 2, 1
51filterMatches: 3, 2
52lookup: 4, 2
53