Daniel Kinzler has uploaded a new change for review.

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


Change subject: Use MockStiteStore for testing
......................................................................

Use MockStiteStore for testing

Change-Id: I783bd952759d001767f795178ab19c33872d7e17
---
M client/tests/phpunit/includes/LangLinkHandlerTest.php
M lib/WikibaseLib.classes.php
2 files changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/22/71322/1

diff --git a/client/tests/phpunit/includes/LangLinkHandlerTest.php 
b/client/tests/phpunit/includes/LangLinkHandlerTest.php
index f52c4ef..c31a168 100644
--- a/client/tests/phpunit/includes/LangLinkHandlerTest.php
+++ b/client/tests/phpunit/includes/LangLinkHandlerTest.php
@@ -30,8 +30,8 @@
  *
  * @group WikibaseClient
  * @group Database
- *        ^--- uses DB indirectly; may be removed if Sites is mocked out
- *             and Title is made not to use the database.
+ *        ^--- uses DB indirectly; removed when Title is made not to use the 
database.
+ * @group XXX
  *
  * @licence GNU GPL v2+
  * @author Daniel Kinzler
@@ -72,8 +72,6 @@
 
                if ( !$hasSites ) {
                        $hasSites = true;
-                       //TODO: use mock SiteList instead!
-                       \TestSites::insertIntoDb();
                }
 
                $this->mockRepo = new MockRepository();
@@ -88,7 +86,7 @@
                        array(),
                        array( NS_TALK ),
                        $this->mockRepo,
-                       \SiteSQLStore::newInstance()
+                       \TestSites::newMockSiteStore()
                );
        }
 
diff --git a/lib/WikibaseLib.classes.php b/lib/WikibaseLib.classes.php
index 6076a11..9f864e5 100644
--- a/lib/WikibaseLib.classes.php
+++ b/lib/WikibaseLib.classes.php
@@ -174,6 +174,7 @@
                'Wikibase\Test\EntityLookupTest' => 
'tests/phpunit/EntityLookupTest.php',
                'Wikibase\Test\MockChunkAccess' => 
'tests/phpunit/store/MockChunkAccess.php',
                'Wikibase\Test\TermIndexTest' => 
'tests/phpunit/store/TermIndexTest.php',
+               'Wikibase\Test\MockSiteStore' => 
'tests/phpunit/MockSiteStore.php',
        );
 
        return $classes;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I783bd952759d001767f795178ab19c33872d7e17
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <[email protected]>

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

Reply via email to