Skip to content

Commit

Permalink
Updated the persistent translations test case to confirm that two-let…
Browse files Browse the repository at this point in the history
…ter uppercase persistent strings work (refs #93)
  • Loading branch information
kkomelin committed Mar 2, 2025
1 parent 5d31021 commit eabb22b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/ExporterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ public function testPersistentTranslations()
'name1_en' => 'name1_es',
'name2_en' => 'name2_es',
'name3_en' => 'name3_es',
'MO' => 'MO_translated',
];

$content = json_encode($existing_translations);
Expand All @@ -322,7 +323,7 @@ public function testPersistentTranslations()

// 2. Create a file with the keys of any strings which should persist even if they are not contained in the views.

$persistentContent = json_encode(['name2_en']);
$persistentContent = json_encode(['name2_en', 'MO']);
$this->writeToTranslationFile(Exporter::PERSISTENT_STRINGS_FILENAME_WO_EXT, $persistentContent);

// 3. Create a test view only containing one of the non-persistent strings, and a new string.
Expand All @@ -341,6 +342,7 @@ public function testPersistentTranslations()
'name1_en' => 'name1_es',
'name2_en' => 'name2_es',
'name4_en' => 'name4_en',
'MO' => 'MO_translated',
];

$this->assertEquals($expected, $actual);
Expand Down

0 comments on commit eabb22b

Please sign in to comment.