public function testCrLfToLfOnWrite()
{
$this->adapter->mo = false;
$file = "{$this->_path}/de/LC_MESSAGES/default.po";
$catalog = array("this is the\r\nmessage" => array('id' => "this is the\r\nmessage", 'ids' => array('singular' => "this is the\r\nmessage"), 'flags' => array(), 'translated' => "this is the\r\ntranslation", 'occurrences' => array(), 'comments' => array(), 'context' => null));
$po = <<<EOD
msgid "this is the\\nmessage"
msgstr "this is the\\ntranslation"
EOD;
$this->adapter->write('message', 'de', null, $catalog);
$result = file_get_contents($file);
$this->assertPattern('/' . preg_quote($po, '/') . '/', $result);
}