summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/Translate/tests/phpunit/ffs/AppleFFSTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/Translate/tests/phpunit/ffs/AppleFFSTest.php')
-rw-r--r--www/wiki/extensions/Translate/tests/phpunit/ffs/AppleFFSTest.php60
1 files changed, 30 insertions, 30 deletions
diff --git a/www/wiki/extensions/Translate/tests/phpunit/ffs/AppleFFSTest.php b/www/wiki/extensions/Translate/tests/phpunit/ffs/AppleFFSTest.php
index 2bbda88c..f9f00b1a 100644
--- a/www/wiki/extensions/Translate/tests/phpunit/ffs/AppleFFSTest.php
+++ b/www/wiki/extensions/Translate/tests/phpunit/ffs/AppleFFSTest.php
@@ -11,18 +11,18 @@
class AppleFFSTest 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' => 'AppleFFS',
- ),
- );
+ ],
+ ];
public function testParsing() {
$file =
@@ -45,17 +45,17 @@ STRINGS;
$group = MessageGroupBase::factory( $this->groupConfiguration );
$ffs = new AppleFFS( $group );
$parsed = $ffs->readFromVariable( $file );
- $expected = array(
+ $expected = [
'website' => '<nowiki>http://en.wikipedia.org/</nowiki>',
'language' => 'English',
'key with spaces' => 'Value that can be looked up with "key with spaces".',
// We expect this one to be mangled for storage
'key-with-=7Bcurlies=7D' => 'Value that can be looked up with "key-with-{curlies}".',
- );
- $authors = array(
+ ];
+ $authors = [
'Testy McTesterson',
- );
- $expected = array( 'MESSAGES' => $expected, 'AUTHORS' => $authors );
+ ];
+ $expected = [ 'MESSAGES' => $expected, 'AUTHORS' => $authors ];
$this->assertEquals( $expected, $parsed );
}
@@ -90,24 +90,24 @@ STRINGS;
}
public function rowValuesProvider() {
- return array(
- array( 'key', 'value', 'simple row' ),
- array( 'key', 'value', 'row with different sep' ),
- array( 'key', 'val=ue', 'row with sep inside value' ),
- array( 'k=ey', 'value', 'row with sep inside key' ),
- array( '!key', 'value', 'row with ! at the beginning of key' ),
- array( 'k!ey', 'value', 'row with ! inside key' ),
- array( '#key', 'value', 'row with # at the beginning of key' ),
- array( 'k#ey', 'value', 'row with # inside key' ),
- array( 'k{ey}', 'value', 'row with { and } inside key' ),
- array( 'k\\tey', 'value\\', 'row with escapes' ),
- array( '01234', '13.34', 'row with numbers' ),
- array( '\\n\\tкая', 'кая', 'row with annoying characteres' ),
- array( '=', '', 'row with empty value' ),
- array( '#k e\\=y#', '=v!\\=alue\\ \\\\', 'complex row' ),
- array( 'Key with "quotes"', 'Value "with quotes" also', 'row with double-quotes' ),
- array( 'Key with \\"quotes\\"', 'Value \\"with quotes\\" also',
- 'row with double-quotes AND backslashes' ),
- );
+ return [
+ [ 'key', 'value', 'simple row' ],
+ [ 'key', 'value', 'row with different sep' ],
+ [ 'key', 'val=ue', 'row with sep inside value' ],
+ [ 'k=ey', 'value', 'row with sep inside key' ],
+ [ '!key', 'value', 'row with ! at the beginning of key' ],
+ [ 'k!ey', 'value', 'row with ! inside key' ],
+ [ '#key', 'value', 'row with # at the beginning of key' ],
+ [ 'k#ey', 'value', 'row with # inside key' ],
+ [ 'k{ey}', 'value', 'row with { and } inside key' ],
+ [ 'k\\tey', 'value\\', 'row with escapes' ],
+ [ '01234', '13.34', 'row with numbers' ],
+ [ '\\n\\tкая', 'кая', 'row with annoying characteres' ],
+ [ '=', '', 'row with empty value' ],
+ [ '#k e\\=y#', '=v!\\=alue\\ \\\\', 'complex row' ],
+ [ 'Key with "quotes"', 'Value "with quotes" also', 'row with double-quotes' ],
+ [ 'Key with \\"quotes\\"', 'Value \\"with quotes\\" also',
+ 'row with double-quotes AND backslashes' ],
+ ];
}
}