Skip to content

Commit 8b8452d

Browse files
authored
test(php): use named arguments in tests (#936)
1 parent c2ad18b commit 8b8452d

File tree

2 files changed

+10
-42
lines changed

2 files changed

+10
-42
lines changed

clients/php/test/Api/LocalesApiTest.php

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -123,30 +123,11 @@ public function testLocaleDownload()
123123
$custom_metadata_filters = array('key' => 'value');
124124

125125
$result = $this->apiInstance-> localeDownload(
126-
$projectId,
127-
$id,
128-
null,
129-
null,
130-
null,
131-
null,
132-
$file_format,
133-
null,
134-
null,
135-
null,
136-
null,
137-
null,
138-
null,
139-
null,
140-
$format_options,
141-
null,
142-
null,
143-
null,
144-
null,
145-
null,
146-
null,
147-
null,
148-
null,
149-
$custom_metadata_filters
126+
project_id: $projectId,
127+
id: $id,
128+
file_format: $file_format,
129+
format_options: $format_options,
130+
custom_metadata_filters: $custom_metadata_filters
150131
);
151132

152133

clients/php/test/Api/UploadsApiTest.php

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -87,24 +87,11 @@ public function testUploadCreate()
8787
$file->fwrite('test');
8888

8989
$result = $this->apiInstance->uploadCreate(
90-
$projectId,
91-
$file,
92-
"yml",
93-
"en",
94-
null, # x_phrase_app_otp
95-
null, # branch
96-
null, # tags
97-
null, # update_translations
98-
null, # update_custom_metadata
99-
null, # update_translation_keys
100-
null, # update_translations_on_source_match
101-
null, # source_locale_id
102-
null, # update_descriptions
103-
null, # convert_emoji
104-
null, # skip_upload_tags
105-
null, # skip_unverification
106-
null, # file_encoding
107-
['en' => ['foo' => 3, 'bar' => 'baz']] # locale_mapping
90+
project_id: $projectId,
91+
file: $file,
92+
file_format: "yml",
93+
locale_id: "en",
94+
locale_mapping: ['en' => ['foo' => 3, 'bar' => 'baz']] # locale_mapping
10895
);
10996
$file = null;
11097
unlink($fileName);

0 commit comments

Comments
 (0)