|
12 | 12 | ->toBe('de-Latn-DE-u-ca-gregory-co-phonebk-hc-h23-kf-kn-false-nu-latn')
|
13 | 13 | ->and($loc->baseName)->toBe('de-Latn-DE')
|
14 | 14 | ->and($loc->calendar)->toBe('gregory')
|
| 15 | + ->and($loc->calendars)->toBe(['gregory']) |
15 | 16 | ->and($loc->caseFirst)->toBe('yes')
|
16 | 17 | ->and($loc->collation)->toBe('phonebk')
|
17 | 18 | ->and($loc->hourCycle)->toBe('h23')
|
18 | 19 | ->and($loc->language)->toBe('de')
|
19 | 20 | ->and($loc->numberingSystem)->toBe('latn')
|
20 | 21 | ->and($loc->numeric)->toBeFalse()
|
21 | 22 | ->and($loc->region)->toBe('DE')
|
22 |
| - ->and($loc->script)->toBe('Latn'); |
| 23 | + ->and($loc->script)->toBe('Latn') |
| 24 | + ->and($loc->getCalendars())->toBe($loc->calendars); |
23 | 25 |
|
24 | 26 | $loc = new Locale($langtag, new Locale\Options(
|
25 |
| - language: 'ja', |
26 |
| - script: 'jpan', |
27 |
| - region: 'jp', |
28 | 27 | calendar: 'japanese',
|
| 28 | + caseFirst: 'false', |
29 | 29 | collation: 'search',
|
30 | 30 | hourCycle: 'h24',
|
31 |
| - caseFirst: 'false', |
32 |
| - numeric: true, |
| 31 | + language: 'ja', |
33 | 32 | numberingSystem: 'jpanfin',
|
| 33 | + numeric: true, |
| 34 | + region: 'jp', |
| 35 | + script: 'jpan', |
34 | 36 | ));
|
35 | 37 |
|
36 | 38 | test('all getters return the expected results after replacing all components through option values')
|
37 | 39 | ->expect((string) $loc)
|
38 | 40 | ->toBe('ja-Jpan-JP-u-ca-japanese-co-search-hc-h24-kf-false-kn-nu-jpanfin')
|
39 | 41 | ->and($loc->baseName)->toBe('ja-Jpan-JP')
|
40 | 42 | ->and($loc->calendar)->toBe('japanese')
|
| 43 | + ->and($loc->calendars)->toBe(['japanese']) |
41 | 44 | ->and($loc->caseFirst)->toBe('false')
|
42 | 45 | ->and($loc->collation)->toBe('search')
|
43 | 46 | ->and($loc->hourCycle)->toBe('h24')
|
44 | 47 | ->and($loc->language)->toBe('ja')
|
45 | 48 | ->and($loc->numberingSystem)->toBe('jpanfin')
|
46 | 49 | ->and($loc->numeric)->toBeTrue()
|
47 | 50 | ->and($loc->region)->toBe('JP')
|
48 |
| - ->and($loc->script)->toBe('Jpan'); |
| 51 | + ->and($loc->script)->toBe('Jpan') |
| 52 | + ->and($loc->getCalendars())->toBe($loc->calendars); |
49 | 53 |
|
50 | 54 | $loc = new Locale($langtag, new Locale\Options(
|
51 |
| - language: 'fr', |
52 |
| - region: 'ca', |
53 | 55 | collation: 'standard',
|
54 | 56 | hourCycle: 'h11',
|
| 57 | + language: 'fr', |
| 58 | + region: 'ca', |
55 | 59 | ));
|
56 | 60 |
|
57 | 61 | test('all getters return the expected results after replacing only some components through option values')
|
58 | 62 | ->expect((string) $loc)
|
59 | 63 | ->toBe('fr-Latn-CA-u-ca-gregory-co-standard-hc-h11-kf-kn-false-nu-latn')
|
60 | 64 | ->and($loc->baseName)->toBe('fr-Latn-CA')
|
61 | 65 | ->and($loc->calendar)->toBe('gregory')
|
| 66 | + ->and($loc->calendars)->toBe(['gregory']) |
62 | 67 | ->and($loc->caseFirst)->toBe('yes')
|
63 | 68 | ->and($loc->collation)->toBe('standard')
|
64 | 69 | ->and($loc->hourCycle)->toBe('h11')
|
65 | 70 | ->and($loc->language)->toBe('fr')
|
66 | 71 | ->and($loc->numberingSystem)->toBe('latn')
|
67 | 72 | ->and($loc->numeric)->toBeFalse()
|
68 | 73 | ->and($loc->region)->toBe('CA')
|
69 |
| - ->and($loc->script)->toBe('Latn'); |
| 74 | + ->and($loc->script)->toBe('Latn') |
| 75 | + ->and($loc->getCalendars())->toBe($loc->calendars); |
0 commit comments