Skip to content

Commit b2fd396

Browse files
committed
fixed tests
1 parent 11406c9 commit b2fd396

File tree

2 files changed

+16
-22
lines changed

2 files changed

+16
-22
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,12 +1572,6 @@ parameters:
15721572
count: 1
15731573
path: src/lib/ResultExtractor/AggregationResultExtractor/TermAggregationKeyMapper/CountryAggregationKeyMapper.php
15741574

1575-
-
1576-
message: '#^Method Ibexa\\Solr\\ResultExtractor\\AggregationResultExtractor\\TermAggregationKeyMapper\\CountryAggregationKeyMapper\:\:findCountryInfoByIDC\(\) return type has no value type specified in iterable type array\.$#'
1577-
identifier: missingType.iterableValue
1578-
count: 1
1579-
path: src/lib/ResultExtractor/AggregationResultExtractor/TermAggregationKeyMapper/CountryAggregationKeyMapper.php
1580-
15811575
-
15821576
message: '#^Method Ibexa\\Solr\\ResultExtractor\\AggregationResultExtractor\\TermAggregationKeyMapper\\CountryAggregationKeyMapper\:\:map\(\) has parameter \$keys with no value type specified in iterable type array\.$#'
15831577
identifier: missingType.iterableValue

tests/lib/Search/ResultExtractor/AggregationResultExtractor/TermAggregationKeyMapper/CountryAggregationKeyMapperTest.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
final class CountryAggregationKeyMapperTest extends TestCase
1818
{
19-
private const EXAMPLE_RAW_KEYS = [93, 94, 55];
19+
private const EXAMPLE_RAW_KEYS = ['AFG', 'ARG', 'BRA'];
2020

2121
/**
2222
* Example country info entries from "ibexa.field_type.country.data" parameter.
@@ -70,9 +70,9 @@ public function dataProviderForTestMap(): iterable
7070
AggregationResultExtractorTestUtils::EXAMPLE_LANGUAGE_FILTER,
7171
self::EXAMPLE_RAW_KEYS,
7272
[
73-
93 => 'AFG',
74-
94 => 'ARG',
75-
55 => 'BRA',
73+
'AFG' => 'AFG',
74+
'ARG' => 'ARG',
75+
'BRA' => 'BRA',
7676
],
7777
];
7878

@@ -81,9 +81,9 @@ public function dataProviderForTestMap(): iterable
8181
AggregationResultExtractorTestUtils::EXAMPLE_LANGUAGE_FILTER,
8282
self::EXAMPLE_RAW_KEYS,
8383
[
84-
93 => 'AF',
85-
94 => 'AR',
86-
55 => 'BR',
84+
'AFG' => 'AF',
85+
'ARG' => 'AR',
86+
'BRA' => 'BR',
8787
],
8888
];
8989

@@ -92,9 +92,9 @@ public function dataProviderForTestMap(): iterable
9292
AggregationResultExtractorTestUtils::EXAMPLE_LANGUAGE_FILTER,
9393
self::EXAMPLE_RAW_KEYS,
9494
[
95-
93 => 'AFG',
96-
94 => 'ARG',
97-
55 => 'BRA',
95+
'AFG' => 'AFG',
96+
'ARG' => 'ARG',
97+
'BRA' => 'BRA',
9898
],
9999
];
100100

@@ -103,9 +103,9 @@ public function dataProviderForTestMap(): iterable
103103
AggregationResultExtractorTestUtils::EXAMPLE_LANGUAGE_FILTER,
104104
self::EXAMPLE_RAW_KEYS,
105105
[
106-
93 => 'Afghanistan',
107-
94 => 'Argentina',
108-
55 => 'Brazil',
106+
'AFG' => 'Afghanistan',
107+
'ARG' => 'Argentina',
108+
'BRA' => 'Brazil',
109109
],
110110
];
111111

@@ -114,9 +114,9 @@ public function dataProviderForTestMap(): iterable
114114
AggregationResultExtractorTestUtils::EXAMPLE_LANGUAGE_FILTER,
115115
self::EXAMPLE_RAW_KEYS,
116116
[
117-
93 => '93',
118-
94 => '94',
119-
55 => '55',
117+
'AFG' => '93',
118+
'ARG' => '94',
119+
'BRA' => '55',
120120
],
121121
];
122122
}

0 commit comments

Comments
 (0)