summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/Translate/tests/phpunit/ffs/AmdFFSTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/Translate/tests/phpunit/ffs/AmdFFSTest.php')
-rw-r--r--www/wiki/extensions/Translate/tests/phpunit/ffs/AmdFFSTest.php44
1 files changed, 22 insertions, 22 deletions
diff --git a/www/wiki/extensions/Translate/tests/phpunit/ffs/AmdFFSTest.php b/www/wiki/extensions/Translate/tests/phpunit/ffs/AmdFFSTest.php
index 66dc88f3..44ad2147 100644
--- a/www/wiki/extensions/Translate/tests/phpunit/ffs/AmdFFSTest.php
+++ b/www/wiki/extensions/Translate/tests/phpunit/ffs/AmdFFSTest.php
@@ -5,7 +5,7 @@
* @file
* @author Matthias Palmer
* @copyright Copyright © 2011-2015, MetaSolutions AB
- * @license GPL-2.0+
+ * @license GPL-2.0-or-later
*/
/**
@@ -15,20 +15,20 @@ class AmdFFSTest extends MediaWikiTestCase {
public function setUp() {
parent::setUp();
- $this->groupConfiguration = array(
- 'BASIC' => array(
+ $this->groupConfiguration = [
+ 'BASIC' => [
'class' => 'FileBasedMessageGroup',
'id' => 'test-id',
'label' => 'Test Label',
'namespace' => 'NS_MEDIAWIKI',
'description' => 'Test description',
- ),
- 'FILES' => array(
+ ],
+ 'FILES' => [
'class' => 'AmdFFS',
'sourcePattern' => 'fake_reference_not_used_in_practise',
'targetPattern' => 'fake_reference_not_used_in_practise',
- ),
- );
+ ],
+ ];
}
protected $groupConfiguration;
@@ -43,16 +43,16 @@ class AmdFFSTest extends MediaWikiTestCase {
$group = MessageGroupBase::factory( $this->groupConfiguration );
$ffs = new AmdFFS( $group );
$parsed = $ffs->readFromVariable( $file );
- $expected = array(
+ $expected = [
'MESSAGES' => $messages,
- 'AUTHORS' => $authors,
- 'METADATA' => array(),
- );
+ 'AUTHORS' => $authors,
+ 'METADATA' => [],
+ ];
$this->assertEquals( $parsed, $expected );
}
public function amdProvider() {
- $values = array();
+ $values = [];
$file1 =
<<<JS
@@ -63,15 +63,15 @@ define({
});
JS;
- $values[] = array(
- array(
+ $values[] = [
+ [
'one' => 'jeden',
'two' => 'dwa',
'three' => 'trzy',
- ),
- array(),
+ ],
+ [],
$file1,
- );
+ ];
$file2 =
<<<JS
@@ -87,11 +87,11 @@ define({
});
JS;
- $values[] = array(
- array( 'word' => 'слово' ),
- array( 'Matthias', 'Hannes' ),
+ $values[] = [
+ [ 'word' => 'слово' ],
+ [ 'Matthias', 'Hannes' ],
$file2,
- );
+ ];
return $values;
}
@@ -107,7 +107,7 @@ JS;
$parsed = $ffs->readFromVariable( $data );
$this->assertEquals(
- array( 'Nike the bunny' ),
+ [ 'Nike the bunny' ],
$parsed['AUTHORS'],
'Authors are exported'
);