summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/Translate/tests/phpunit/BlackListTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/Translate/tests/phpunit/BlackListTest.php')
-rw-r--r--www/wiki/extensions/Translate/tests/phpunit/BlackListTest.php38
1 files changed, 18 insertions, 20 deletions
diff --git a/www/wiki/extensions/Translate/tests/phpunit/BlackListTest.php b/www/wiki/extensions/Translate/tests/phpunit/BlackListTest.php
index 19806b3e..0e91f765 100644
--- a/www/wiki/extensions/Translate/tests/phpunit/BlackListTest.php
+++ b/www/wiki/extensions/Translate/tests/phpunit/BlackListTest.php
@@ -1,11 +1,9 @@
<?php
/**
- * Unit tests.
- *
* @file
* @author Santhosh Thottingal
* @copyright Copyright © 2012-2013, Santhosh Thottingal
- * @license GPL-2.0+
+ * @license GPL-2.0-or-later
*/
/**
@@ -18,18 +16,18 @@ class BlackListTest extends MediaWikiTestCase {
*/
protected $group;
protected $codes;
- 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' => 'TestFFS',
- ),
- );
+ ],
+ ];
protected function setUp() {
parent::setUp();
@@ -49,9 +47,9 @@ class BlackListTest extends MediaWikiTestCase {
public function testAllBlackList() {
$conf = $this->groupConfiguration;
- $conf['LANGUAGES'] = array(
+ $conf['LANGUAGES'] = [
'blacklist' => '*',
- );
+ ];
$group = MessageGroupBase::factory( $conf );
$translatableLanguages = $group->getTranslatableLanguages();
$this->assertEquals( count( $translatableLanguages ), 0 );
@@ -59,9 +57,9 @@ class BlackListTest extends MediaWikiTestCase {
public function testAllWhiteList() {
$conf = $this->groupConfiguration;
- $conf['LANGUAGES'] = array(
+ $conf['LANGUAGES'] = [
'whitelist' => '*',
- );
+ ];
$group = MessageGroupBase::factory( $conf );
$translatableLanguages = $group->getTranslatableLanguages();
$this->assertNull( $translatableLanguages );
@@ -69,10 +67,10 @@ class BlackListTest extends MediaWikiTestCase {
public function testWhiteListOverrideBlackList() {
$conf = $this->groupConfiguration;
- $conf['LANGUAGES'] = array(
- 'whitelist' => array( 'en', 'hi', 'ta' ),
- 'blacklist' => array( 'ta' ),
- );
+ $conf['LANGUAGES'] = [
+ 'whitelist' => [ 'en', 'hi', 'ta' ],
+ 'blacklist' => [ 'ta' ],
+ ];
$group = MessageGroupBase::factory( $conf );
$translatableLanguages = $group->getTranslatableLanguages();
$this->assertTrue( isset( $translatableLanguages['ta'] ) );
@@ -81,9 +79,9 @@ class BlackListTest extends MediaWikiTestCase {
public function testSomeBlackList() {
$conf = $this->groupConfiguration;
- $conf['LANGUAGES'] = array(
- 'blacklist' => array( 'or', 'hi' ),
- );
+ $conf['LANGUAGES'] = [
+ 'blacklist' => [ 'or', 'hi' ],
+ ];
$group = MessageGroupBase::factory( $conf );
$translatableLanguages = $group->getTranslatableLanguages();
$this->assertTrue( !isset( $translatableLanguages['hi'] ) );