Siebrand has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/102680


Change subject: Fix some TODOs
......................................................................

Fix some TODOs

* Make a private class prooerty protected
* Update type hints

Change-Id: I3cec052799b4e5bcf69ec6b351d084dc8bd965e0
---
M messagegroups/MessageGroupOld.php
M tests/phpunit/MessageIndexTest.php
M tests/phpunit/MockWikiMessageGroup.php
3 files changed, 2 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/80/102680/1

diff --git a/messagegroups/MessageGroupOld.php 
b/messagegroups/MessageGroupOld.php
index ebf2f8a..bad1d04 100644
--- a/messagegroups/MessageGroupOld.php
+++ b/messagegroups/MessageGroupOld.php
@@ -252,7 +252,7 @@
        /**
         * All the messages for this group, by language code.
         */
-       private $messages = array();
+       protected $messages = array();
 
        /**
         * Returns path to the file where translation of language code $code 
are.
diff --git a/tests/phpunit/MessageIndexTest.php 
b/tests/phpunit/MessageIndexTest.php
index 8d5957e..bcdffeb 100644
--- a/tests/phpunit/MessageIndexTest.php
+++ b/tests/phpunit/MessageIndexTest.php
@@ -35,15 +35,13 @@
         */
        public function testMessageIndexImplementation( $mi ) {
                $data = self::getTestData();
-               /** @var MessageIndex $mi */
-               // @todo Member has protected access
+               /** @var 
TestableDatabaseMessageIndex|TestableCDBMessageIndex|TestableSerializedMessageIndex
 $mi */
                $mi->store( $data );
 
                $tests = array_rand( $data, 10 );
                foreach ( $tests as $key ) {
                        $this->assertSame(
                                $data[$key],
-                               // @todo Member has protected access
                                $mi->get( $key ),
                                "Values are preserved for random key $key"
                        );
@@ -55,7 +53,6 @@
                foreach ( $tests as $key ) {
                        $this->assertSame(
                                $data[$key],
-                               // @todo Member has protected access
                                $mi->get( $key ),
                                "Values are preserved after retrieve for random 
key $key"
                        );
diff --git a/tests/phpunit/MockWikiMessageGroup.php 
b/tests/phpunit/MockWikiMessageGroup.php
index ca185ed..5801bbe 100644
--- a/tests/phpunit/MockWikiMessageGroup.php
+++ b/tests/phpunit/MockWikiMessageGroup.php
@@ -10,16 +10,13 @@
  */
 
 class MockWikiMessageGroup extends WikiMessageGroup {
-
        public function __construct( $id, array $messages ) {
                parent::__construct( $id, 'unused' );
                $this->id = $id;
-               // @todo Member has private access
                $this->messages = $messages;
        }
 
        public function getDefinitions() {
-               // @todo Member has private access
                return $this->messages;
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/102680
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3cec052799b4e5bcf69ec6b351d084dc8bd965e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to