Skip to content
Extraits de code Groupes Projets
Valider 0499b17c rédigé par Fabian Becker's avatar Fabian Becker
Parcourir les fichiers

Downgrade json_encode to 5.3 for now (ommit JSON_UNESCAPED_UNICODE and JSON_PRETTY_PRINT)

Adjust TranslationWriterTest

fixes #4086
parent f6f4fed8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -107,7 +107,10 @@ class TranslationWriter
}
}
return json_encode($cleanedTranslations, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
/*
* ToDo: Use JSON_UNESCAPED_UNICODE and JSON_PRETTY_PRINT for PHP >= 5.4
*/
return json_encode($cleanedTranslations);
}
/**
......
......@@ -179,17 +179,7 @@ class TranslationWriterTest extends PHPUnit_Framework_TestCase
$this->assertNotEquals(false, $rc);
$contents = file_get_contents($path);
$expected = <<<'EOD'
{
"General": {
"Locale": "en_CA.UTF-8",
"Id": "Id"
},
"Goals": {
"Goals": "Goals"
}
}
EOD;
$expected = '{"General":{"Locale":"en_CA.UTF-8","Id":"Id"},"Goals":{"Goals":"Goals"},"Plugin":{"Body":"Message\nBody"}}';
if (Common::isWindows()) $expected = str_replace("\r\n", "\n", $expected);
$this->assertEquals($expected, $contents);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter