apply StyleCI recommendation

This commit is contained in:
El RIDO 2020-02-01 09:39:14 +01:00
parent 1b206e8495
commit 21ca30af3c
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92

View file

@ -159,7 +159,7 @@ class I18nTest extends PHPUnit_Framework_TestCase
{ {
$_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'foobar'; $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'foobar';
I18n::loadTranslations(); I18n::loadTranslations();
$input = '&<>"\'/`='; $input = '&<>"\'/`=';
$result = htmlspecialchars($input, ENT_QUOTES | ENT_HTML5 | ENT_DISALLOWED, 'UTF-8', false); $result = htmlspecialchars($input, ENT_QUOTES | ENT_HTML5 | ENT_DISALLOWED, 'UTF-8', false);
$this->assertEquals($result, I18n::encode($input), 'encodes HTML entities'); $this->assertEquals($result, I18n::encode($input), 'encodes HTML entities');
$this->assertEquals('<a>some ' . $result . ' + 1</a>', I18n::_('<a>some %s + %d</a>', $input, 1), 'encodes parameters in translations'); $this->assertEquals('<a>some ' . $result . ' + 1</a>', I18n::_('<a>some %s + %d</a>', $input, 1), 'encodes parameters in translations');