php-gettext / Gettext

PHP library to collect and manipulate gettext (.po, .mo, .php, .json, etc)
MIT License
688 stars 134 forks source link

testMoGenerator fails #269

Closed sdp5 closed 3 years ago

sdp5 commented 3 years ago

Not sure, why I'm getting following stack trace:

php /usr/bin/phpunit --bootstrap Gettext/autoload.php tests
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.
...............F.............................                     45 / 45 (100%)
There was 1 failure:
1) Gettext\Tests\MoGeneratorTest::testMoGenerator
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-������������<�������\�������\������]������p��������������������������&�����7���context-1Original�context-1Other comment�123456�Content-Type: text/plain; charset=UTF-8
+���������������<�������\�������\������]������p�������������������������&�����7�context-1Original�context-1Other comment�123456�Content-Type: text/plain; charset=UTF-8
 Language: gl_ES
 Plural-Forms: nplurals=2; plural=n != 1;
 X-Domain: my-domain
 X-Generator: PHP-Gettext�Orixinal�Outro comentario�12345
Gettext-5.5.4/tests/MoGeneratorTest.php:46

PHP 8.0.6-3 PHPUnit 5.7.27 php-gettext-languages 2.6.0-3

oscarotero commented 3 years ago

Maybe it's the phpunit version? In composer.json is required version the version 8 (https://github.com/php-gettext/Gettext/blob/master/composer.json#L25)

sdp5 commented 3 years ago

Yep - worked with phpunit8