jenkins-bot has submitted this change and it was merged.

Change subject: Fix tests for when GeoData extension is not available
......................................................................


Fix tests for when GeoData extension is not available

Change-Id: Ic390b7bc2381fbffdf9f1b033d4c04276c461c4c
---
M repo/tests/phpunit/includes/ParserOutput/GeoDataDataUpdateTest.php
1 file changed, 12 insertions(+), 1 deletion(-)

Approvals:
  Hoo man: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/tests/phpunit/includes/ParserOutput/GeoDataDataUpdateTest.php 
b/repo/tests/phpunit/includes/ParserOutput/GeoDataDataUpdateTest.php
index 3779727..065464f 100644
--- a/repo/tests/phpunit/includes/ParserOutput/GeoDataDataUpdateTest.php
+++ b/repo/tests/phpunit/includes/ParserOutput/GeoDataDataUpdateTest.php
@@ -33,8 +33,15 @@
  */
 class GeoDataDataUpdateTest extends \MediaWikiTestCase {
 
-       protected function setUp() {
+       private function willSkipTests() {
                if ( !class_exists( 'GeoData' ) ) {
+                       return true;
+               }
+               return false;
+       }
+
+       protected function setUp() {
+               if ( $this->willSkipTests() ) {
                        $this->markTestSkipped( 'GeoData extension is 
required.' );
                }
 
@@ -62,6 +69,10 @@
        }
 
        public function processStatementProvider() {
+               if ( $this->willSkipTests() ) {
+                       return array( array( array(), array(), 'dummy test will 
be skipped' ) );
+               }
+
                $statements = $this->getStatements();
                $coords = $this->getCoords();
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic390b7bc2381fbffdf9f1b033d4c04276c461c4c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: JanZerebecki <jan.wikime...@zerebecki.de>
Gerrit-Reviewer: Aude <aude.w...@gmail.com>
Gerrit-Reviewer: Hoo man <h...@online.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to