Skip to content

Commit 18737b3

Browse files
committed
Assert the translated value in the MO generator test
1 parent 53da0b0 commit 18737b3

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎tests/TranslationTest.php‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ public function test_mo_file_includes_headers_and_translations_that_are_zero() {
144144
$this->assertStringContainsString( "start of week\x041\x00", $mo );
145145
$this->assertStringContainsString( "%d item\x00%d items\x00", $mo );
146146
$this->assertStringContainsString( "%d item (DE)\x00%d items (DE)\x00", $mo );
147+
148+
$loaded = ( new \Gettext\Loader\MoLoader() )->loadString( $mo )->find( 'start of week', '1' );
149+
$this->assertNotNull( $loaded );
150+
$this->assertSame( '0', $loaded->getTranslation() );
151+
147152
$this->assertStringNotContainsString( 'Untranslated', $mo );
148153
$this->assertStringNotContainsString( 'Disabled', $mo );
149154
}

0 commit comments

Comments
 (0)