diff options
author | Brian Evans <grknight@gentoo.org> | 2018-11-20 10:51:06 -0500 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2018-11-20 10:51:06 -0500 |
commit | 1ea74fa59d8d1c6c12d20be6c8e7d5ac7f370fdb (patch) | |
tree | ad113bd05db878a61b503938c05fe046eca25ee0 /MLEB/Translate/tests/phpunit/ffs/XliffFFSTest.php | |
parent | LinkAttributes: Update to v0.2 (diff) | |
download | extensions-1ea74fa59d8d1c6c12d20be6c8e7d5ac7f370fdb.tar.gz extensions-1ea74fa59d8d1c6c12d20be6c8e7d5ac7f370fdb.tar.bz2 extensions-1ea74fa59d8d1c6c12d20be6c8e7d5ac7f370fdb.zip |
Update to MediaWikiLanguageExtensionBundle-2018.10
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'MLEB/Translate/tests/phpunit/ffs/XliffFFSTest.php')
-rw-r--r-- | MLEB/Translate/tests/phpunit/ffs/XliffFFSTest.php | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/MLEB/Translate/tests/phpunit/ffs/XliffFFSTest.php b/MLEB/Translate/tests/phpunit/ffs/XliffFFSTest.php index 3974338f..ac9c7db3 100644 --- a/MLEB/Translate/tests/phpunit/ffs/XliffFFSTest.php +++ b/MLEB/Translate/tests/phpunit/ffs/XliffFFSTest.php @@ -4,45 +4,46 @@ * * @file * @author Niklas Laxström - * @license GPL-2.0+ + * @license GPL-2.0-or-later */ class XliffFFSTest extends MediaWikiTestCase { - protected $groupConfiguration = array( - 'BASIC' => array( + protected $groupConfiguration = [ + 'BASIC' => [ 'class' => 'FileBasedMessageGroup', 'id' => 'test-id', 'label' => 'Test Label', 'namespace' => 'NS_MEDIAWIKI', 'description' => 'Test description', - ), - 'FILES' => array( + ], + 'FILES' => [ 'class' => 'XliffFFS', 'sourcePattern' => '', - ), - ); + ], + ]; public function testParsing() { + /** @var FileBasedMessageGroup $group */ $group = MessageGroupBase::factory( $this->groupConfiguration ); $ffs = new XliffFFS( $group ); $file = file_get_contents( __DIR__ . '/../data/minimal.xlf' ); $parsed = $ffs->readFromVariable( $file, 'target' ); - $expected = array( + $expected = [ '1' => 'Hei maailma', '2' => TRANSLATE_FUZZY . 'Fuzzy translation', '3' => 'Tämä on <g id="1" ctype="bold">paksu</g>.', - ); - $expected = array( 'MESSAGES' => $expected ); + ]; + $expected = [ 'MESSAGES' => $expected ]; $this->assertEquals( $expected, $parsed ); $parsed = $ffs->readFromVariable( $file, 'source' ); - $expected = array( + $expected = [ '1' => 'Hello world', '2' => 'Fuzzy message', '3' => 'This is <g id="1" ctype="bold">bold</g>.', - ); - $expected = array( 'MESSAGES' => $expected ); + ]; + $expected = [ 'MESSAGES' => $expected ]; $this->assertEquals( $expected, $parsed ); } } |