diff options
Diffstat (limited to 'MLEB/Translate/tests/phpunit/ffs/AndroidXmlFFSTest.php')
-rw-r--r-- | MLEB/Translate/tests/phpunit/ffs/AndroidXmlFFSTest.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/MLEB/Translate/tests/phpunit/ffs/AndroidXmlFFSTest.php b/MLEB/Translate/tests/phpunit/ffs/AndroidXmlFFSTest.php index 1c071b7b..ac415cf0 100644 --- a/MLEB/Translate/tests/phpunit/ffs/AndroidXmlFFSTest.php +++ b/MLEB/Translate/tests/phpunit/ffs/AndroidXmlFFSTest.php @@ -1,31 +1,29 @@ <?php /** - * Tests for AndroidXmlFFS - * * @file * @author Niklas Laxström * @license GPL-2.0-or-later */ -class AndroidXmlFFSTest extends MediaWikiTestCase { +class AndroidXmlFFSTest extends MediaWikiIntegrationTestCase { protected $groupConfiguration = [ 'BASIC' => [ - 'class' => 'FileBasedMessageGroup', + 'class' => FileBasedMessageGroup::class, 'id' => 'test-id', 'label' => 'Test Label', 'namespace' => 'NS_MEDIAWIKI', 'description' => 'Test description', ], 'FILES' => [ - 'class' => 'AndroidXmlFFS', + 'class' => AndroidXmlFFS::class, 'sourcePattern' => '', ], ]; public function testParsing() { $file = -<<<XML +<<<'XML' <?xml version="1.0" encoding="utf-8"?> <!-- Authors: * Imaginary translator @@ -41,6 +39,9 @@ class AndroidXmlFFSTest extends MediaWikiTestCase { <string name="starts_with_at">\@Wikipedia</string> <string name="has_ampersand">1&nbsp;000</string> <string name="has_newline">first\nsecond</string> + <string name="has_slashes">first \\ second</string> + <string name="utf8_symbols">Hello World: \\u1234 \u1234 \\\u1234</string> + <string name="quote_double_slash">Hello World: \' \\\'</string> </resources> XML; @@ -59,6 +60,9 @@ XML; 'starts_with_at' => '@Wikipedia', 'has_ampersand' => '1 000', 'has_newline' => "first\nsecond", + 'has_slashes' => 'first \\ second', + 'utf8_symbols' => "Hello World: \u1234 ሴ \ሴ", + 'quote_double_slash' => 'Hello World: \' \\\'' ], 'AUTHORS' => [ 'Imaginary translator', @@ -81,6 +85,7 @@ XML; 'amuch' => '{{PLURAL|one=bunny|bunnies}}', 'ampersand' => ' &foo', 'newlines' => "first\nsecond", + 'slashes' => 'has \\ slash' ]; $authors = [ '1 Hyphen-Fan', |