Skip to content

Commit 54953c2

Browse files
Suchi GargSonny Kieu
authored andcommitted
[#3551968] feat: Changed the field type to textarea instead of textfield.
By: gargsuchi
1 parent 1164ab6 commit 54953c2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/WebformThirdPartySettingsFormAlter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function alterForm(array &$form, FormStateInterface $form_state): void {
6262
'#weight' => -70,
6363
];
6464
$form['third_party_settings']['webform_openfisca']['fisca_api_authorization_header'] = [
65-
'#type' => 'textfield',
65+
'#type' => 'textarea',
6666
'#title' => $this->t('Authorization header to connect to OpenFisca API'),
6767
'#description' => $this->t('Specify the Authorization header to connect to a private OpenFisca API, e.g. a Basic auth or a Bearer token.'),
6868
'#default_value' => $openfisca_settings->getApiAuthorizationHeader(),

tests/modules/webform_openfisca_test/src/OpenFiscaTestClientMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ protected function getFixtureDirectory(string $host): string {
113113
* The path to the fixture.
114114
*/
115115
protected function getFixturePath(string $host, string $path, string $method = 'GET', string $suffix = ''): string {
116-
return $this->getFixtureDirectory($host) . '/' . '__' . $method . '/' . $path . ($suffix ? "-$suffix" : '') . '.json';
116+
return $this->getFixtureDirectory($host) . '/__' . $method . '/' . $path . ($suffix ? "-$suffix" : '') . '.json';
117117
}
118118

119119
/**

tests/src/Kernel/WebformThirdPartySettingsFormAlterKernelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function testWebformThirdPartySettingsFormAlter(): void {
6868
$this->assertEquals('https://api.openfisca.test/', $openfisca_settings_form['fisca_api_endpoint']['#default_value']);
6969

7070
$this->assertArrayHasKey('fisca_api_authorization_header', $openfisca_settings_form);
71-
$this->assertEquals('textfield', $openfisca_settings_form['fisca_api_authorization_header']['#type']);
71+
$this->assertEquals('textarea', $openfisca_settings_form['fisca_api_authorization_header']['#type']);
7272
$this->assertEquals('Token WEBFORM-OPENFISCA-TEST-TOKEN', $openfisca_settings_form['fisca_api_authorization_header']['#default_value']);
7373

7474
$this->assertArrayHasKey('fisca_return_key', $openfisca_settings_form);

0 commit comments

Comments
 (0)