Skip to content

Commit 4f5989d

Browse files
committed
fix tests
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent 70603f9 commit 4f5989d

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

lib/Service/ProvisioningService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public function provisionUser(string $tokenUserId, int $providerId, object $idTo
243243

244244
$event = new AttributeMappedEvent(ProviderService::SETTING_MAPPING_LANGUAGE, $idTokenPayload, $language);
245245
$this->eventDispatcher->dispatchTyped($event);
246-
$this->logger->debug('Phone mapping event dispatched');
246+
$this->logger->debug('Language mapping event dispatched');
247247
if ($event->hasValue()) {
248248
$language = $event->getValue();
249249
$languagesCodes = $this->l10nFactory->findAvailableLanguages();

tests/unit/Service/ProviderServiceTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public function testGetProvidersWithSettings() {
6565
'mappingQuota' => '1',
6666
'mappingUid' => '1',
6767
'mappingGroups' => '1',
68+
'mappingLanguage' => '1',
6869
'mappingAddress' => '1',
6970
'mappingStreetaddress' => '1',
7071
'mappingPostalcode' => '1',
@@ -105,6 +106,7 @@ public function testGetProvidersWithSettings() {
105106
'mappingQuota' => '1',
106107
'mappingUid' => '1',
107108
'mappingGroups' => '1',
109+
'mappingLanguage' => '1',
108110
'mappingAddress' => '1',
109111
'mappingStreetaddress' => '1',
110112
'mappingPostalcode' => '1',
@@ -149,6 +151,7 @@ public function testSetSettings() {
149151
'extraClaims' => 'claim1 claim2',
150152
'providerBasedId' => false,
151153
'groupProvisioning' => true,
154+
'mappingLanguage' => 'language',
152155
'mappingAddress' => 'address',
153156
'mappingStreetaddress' => 'street_address',
154157
'mappingPostalcode' => 'postal_code',
@@ -176,6 +179,7 @@ public function testSetSettings() {
176179
[Application::APP_ID, 'provider-1-' . ProviderService::SETTING_MAPPING_QUOTA, '', '1g'],
177180
[Application::APP_ID, 'provider-1-' . ProviderService::SETTING_MAPPING_UID, '', 'uid'],
178181
[Application::APP_ID, 'provider-1-' . ProviderService::SETTING_MAPPING_GROUPS, '', 'groups'],
182+
[Application::APP_ID, 'provider-1-' . ProviderService::SETTING_MAPPING_LANGUAGE, '', 'language'],
179183
[Application::APP_ID, 'provider-1-' . ProviderService::SETTING_MAPPING_ADDRESS, '', 'address'],
180184
[Application::APP_ID, 'provider-1-' . ProviderService::SETTING_MAPPING_STREETADDRESS, '', 'street_address'],
181185
[Application::APP_ID, 'provider-1-' . ProviderService::SETTING_MAPPING_POSTALCODE, '', 'postal_code'],

tests/unit/Service/ProvisioningServiceTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ public function testProvisionUserAutoProvisioning(): void {
126126
[$providerId, ProviderService::SETTING_MAPPING_DISPLAYNAME, 'name', 'name'],
127127
[$providerId, ProviderService::SETTING_MAPPING_QUOTA, 'quota', 'quota'],
128128
[$providerId, ProviderService::SETTING_GROUP_PROVISIONING, '0', '0'],
129+
[$providerId, ProviderService::SETTING_MAPPING_LANGUAGE, 'language', 'language'],
129130
[$providerId, ProviderService::SETTING_MAPPING_ADDRESS, 'address', 'address'],
130131
[$providerId, ProviderService::SETTING_MAPPING_STREETADDRESS, 'street_address', 'street_address'],
131132
[$providerId, ProviderService::SETTING_MAPPING_POSTALCODE, 'postal_code', 'postal_code'],

0 commit comments

Comments
 (0)