summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/Translate/tests/phpunit/ffs/XliffFFSTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/Translate/tests/phpunit/ffs/XliffFFSTest.php')
-rw-r--r--www/wiki/extensions/Translate/tests/phpunit/ffs/XliffFFSTest.php28
1 files changed, 13 insertions, 15 deletions
diff --git a/www/wiki/extensions/Translate/tests/phpunit/ffs/XliffFFSTest.php b/www/wiki/extensions/Translate/tests/phpunit/ffs/XliffFFSTest.php
index 8d18a422..96055c17 100644
--- a/www/wiki/extensions/Translate/tests/phpunit/ffs/XliffFFSTest.php
+++ b/www/wiki/extensions/Translate/tests/phpunit/ffs/XliffFFSTest.php
@@ -1,26 +1,24 @@
<?php
/**
- * Tests for XliffFFS
- *
* @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 */
@@ -29,21 +27,21 @@ class XliffFFSTest extends MediaWikiTestCase {
$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 );
}
}