Skip to content

Commit

Permalink
added test #263
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Nov 17, 2020
1 parent cdaae2f commit 219a7e6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/PoLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,22 @@ public function testStringDecode($source, $decoded)
{
$this->assertSame($decoded, PoLoader::decode($source));
}

public function testMultilineDisabledTranslations() {
$po = <<<EOT
#~ msgid "Last agent hours-description"
#~ msgstr ""
#~ "How many hours in the past can system look at finding the last agent? "
#~ "This parameter is only used if 'Call Last Agent' is set to 'YES'."
EOT;
$loader = new PoLoader();
$translations = $loader->loadString($po);
$translation = $translations->find(null, 'Last agent hours-description');

$this->assertTrue($translation->isDisabled());
$this->assertEquals(
"How many hours in the past can system look at finding the last agent? This parameter is only used if 'Call Last Agent' is set to 'YES'.",
$translation->getTranslation()
);
}
}

0 comments on commit 219a7e6

Please sign in to comment.