[MediaWiki-commits] [Gerrit] mediawiki...GeoData[master]: Add missing @covers tags to existing test cases

2018-01-24 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/406029 )

Change subject: Add missing @covers tags to existing test cases
..


Add missing @covers tags to existing test cases

I'm intentionally adding both class-level as well as function-level
@covers tags:
* I am adding function-level @covers when it is obvious a test case is
  meant to test this single function only. Everything else would be
  accidential coverage, which I don't want.
* I'm adding @covers on the class level when it is obvious which class
  is under test. This is helpful because there are some test cases that
  test a whole feature set of a class, and not only a specific method.
  This is obviously not possible for "misc" test cases.

Change-Id: Ic7d5b8b2e81cf09753a2f7bf73dfd2304f69b1b6
---
M tests/phpunit/BoundingBoxTest.php
M tests/phpunit/CoordTest.php
M tests/phpunit/GeoDataMathTest.php
M tests/phpunit/GeoFeatureTest.php
M tests/phpunit/GeoSearchTest.php
M tests/phpunit/GlobeTest.php
M tests/phpunit/MiscGeoDataTest.php
M tests/phpunit/ParseCoordTest.php
M tests/phpunit/TagTest.php
9 files changed, 30 insertions(+), 1 deletion(-)

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



diff --git a/tests/phpunit/BoundingBoxTest.php 
b/tests/phpunit/BoundingBoxTest.php
index 29fc5fb..09cc178 100644
--- a/tests/phpunit/BoundingBoxTest.php
+++ b/tests/phpunit/BoundingBoxTest.php
@@ -6,10 +6,13 @@
 use MediaWikiTestCase;
 
 /**
+ * @covers \GeoData\BoundingBox
+ *
  * @group GeoData
  */
 class BoundingBoxTest extends MediaWikiTestCase {
/**
+* @covers \GeoData\BoundingBox::center
 * @dataProvider provideCenter
 */
public function testCenter( $latExpected, $lonExpected, $lat1, $lon1, 
$lat2, $lon2 ) {
diff --git a/tests/phpunit/CoordTest.php b/tests/phpunit/CoordTest.php
index e8a52e7..a696415 100644
--- a/tests/phpunit/CoordTest.php
+++ b/tests/phpunit/CoordTest.php
@@ -8,12 +8,15 @@
 use MediaWikiTestCase;
 
 /**
+ * @covers \GeoData\Coord
+ *
  * @todo: More tests
  * @group GeoData
  */
 class CoordTest extends MediaWikiTestCase {
 
/**
+* @covers \GeoData\Coord::equalsTo
 * @dataProvider provideEquals
 * @param Coord $coord1
 * @param Coord $coord2
@@ -112,6 +115,7 @@
}
 
/**
+* @covers \GeoData\Coord::fullyEqualsTo
 * @dataProvider provideFullyEquals
 *
 * @param Coord $coord1
@@ -237,6 +241,9 @@
return array_merge( $this->provideAlwaysEqualCoords(), 
$testCases );
}
 
+   /**
+* @covers \GeoData\Coord::bboxAround
+*/
public function testBboxAround() {
for ( $i = 0; $i < 90; $i += 5 ) {
$coord = new Coord( $i, $i );
@@ -249,6 +256,7 @@
}
 
/**
+* @covers \GeoData\Coord::getGlobeObj
 * @dataProvider provideGlobeObj
 */
public function testGlobeObj( $name, Globe $expected ) {
diff --git a/tests/phpunit/GeoDataMathTest.php 
b/tests/phpunit/GeoDataMathTest.php
index d867f7c..0212609 100644
--- a/tests/phpunit/GeoDataMathTest.php
+++ b/tests/phpunit/GeoDataMathTest.php
@@ -7,10 +7,13 @@
 use MediaWikiTestCase;
 
 /**
+ * @covers \GeoData\Math
+ *
  * @group GeoData
  */
 class GeoDataMathTest extends MediaWikiTestCase {
/**
+* @covers \GeoData\Math::distance
 * @dataProvider getDistanceData
 */
public function testDistance( $lat1, $lon1, $lat2, $lon2, $dist, $name 
) {
@@ -29,6 +32,8 @@
}
 
/**
+* @covers \GeoData\Coord::bboxAround
+* @covers \GeoData\Math::wrapAround
 * @dataProvider getRectData
 * @todo: test directly now that this function is public
 */
diff --git a/tests/phpunit/GeoFeatureTest.php b/tests/phpunit/GeoFeatureTest.php
index 2799887..3a76901 100644
--- a/tests/phpunit/GeoFeatureTest.php
+++ b/tests/phpunit/GeoFeatureTest.php
@@ -11,7 +11,7 @@
 use Wikimedia\Rdbms\LoadBalancer;
 
 /**
- * Test GeoFeature functions.
+ * @covers \GeoData\CirrusGeoFeature
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -93,6 +93,7 @@
}
 
/**
+* @covers \GeoData\CirrusGeoFeature::parseDistance
 * @dataProvider parseDistanceProvider
 */
public function testParseDistance( $expected, $distance ) {
@@ -162,6 +163,7 @@
}
 
/**
+* @covers \GeoData\CirrusGeoFeature::parseGeoNearby
 * @dataProvider parseGeoNearbyProvider
 */
public function testParseGeoNearby( $expected, $value ) {
@@ -244,6 +246,7 @@
}
 
/**
+* @covers \GeoData\CirrusGeoFeature::parseGeoNearbyTitle
 * @dataProvider parseGeoNearbyTitleProvider
 */

[MediaWiki-commits] [Gerrit] mediawiki...GeoData[master]: Add missing @covers tags to existing test cases

2018-01-24 Thread Thiemo Kreuz (WMDE) (Code Review)
Thiemo Kreuz (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/406029 )

Change subject: Add missing @covers tags to existing test cases
..

Add missing @covers tags to existing test cases

I'm intentionally adding both class-level as well as function-level
@covers tags:
* I am adding function-level @covers when it is obvious a test case is
  meant to test this single function only. Everything else would be
  accidential coverage, which I don't want.
* I'm adding @covers on the class level when it is obvious which class
  is under test. This is helpful because there are some test cases that
  test a whole feature set of a class, and not only a specific method.
  This is obviously not possible for "misc" test cases.

Change-Id: Ic7d5b8b2e81cf09753a2f7bf73dfd2304f69b1b6
---
M tests/phpunit/BoundingBoxTest.php
M tests/phpunit/CoordTest.php
M tests/phpunit/GeoDataMathTest.php
M tests/phpunit/GeoFeatureTest.php
M tests/phpunit/GeoSearchTest.php
M tests/phpunit/GlobeTest.php
M tests/phpunit/MiscGeoDataTest.php
M tests/phpunit/ParseCoordTest.php
M tests/phpunit/TagTest.php
9 files changed, 30 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GeoData 
refs/changes/29/406029/1

diff --git a/tests/phpunit/BoundingBoxTest.php 
b/tests/phpunit/BoundingBoxTest.php
index 29fc5fb..09cc178 100644
--- a/tests/phpunit/BoundingBoxTest.php
+++ b/tests/phpunit/BoundingBoxTest.php
@@ -6,10 +6,13 @@
 use MediaWikiTestCase;
 
 /**
+ * @covers \GeoData\BoundingBox
+ *
  * @group GeoData
  */
 class BoundingBoxTest extends MediaWikiTestCase {
/**
+* @covers \GeoData\BoundingBox::center
 * @dataProvider provideCenter
 */
public function testCenter( $latExpected, $lonExpected, $lat1, $lon1, 
$lat2, $lon2 ) {
diff --git a/tests/phpunit/CoordTest.php b/tests/phpunit/CoordTest.php
index e8a52e7..a696415 100644
--- a/tests/phpunit/CoordTest.php
+++ b/tests/phpunit/CoordTest.php
@@ -8,12 +8,15 @@
 use MediaWikiTestCase;
 
 /**
+ * @covers \GeoData\Coord
+ *
  * @todo: More tests
  * @group GeoData
  */
 class CoordTest extends MediaWikiTestCase {
 
/**
+* @covers \GeoData\Coord::equalsTo
 * @dataProvider provideEquals
 * @param Coord $coord1
 * @param Coord $coord2
@@ -112,6 +115,7 @@
}
 
/**
+* @covers \GeoData\Coord::fullyEqualsTo
 * @dataProvider provideFullyEquals
 *
 * @param Coord $coord1
@@ -237,6 +241,9 @@
return array_merge( $this->provideAlwaysEqualCoords(), 
$testCases );
}
 
+   /**
+* @covers \GeoData\Coord::bboxAround
+*/
public function testBboxAround() {
for ( $i = 0; $i < 90; $i += 5 ) {
$coord = new Coord( $i, $i );
@@ -249,6 +256,7 @@
}
 
/**
+* @covers \GeoData\Coord::getGlobeObj
 * @dataProvider provideGlobeObj
 */
public function testGlobeObj( $name, Globe $expected ) {
diff --git a/tests/phpunit/GeoDataMathTest.php 
b/tests/phpunit/GeoDataMathTest.php
index d867f7c..0212609 100644
--- a/tests/phpunit/GeoDataMathTest.php
+++ b/tests/phpunit/GeoDataMathTest.php
@@ -7,10 +7,13 @@
 use MediaWikiTestCase;
 
 /**
+ * @covers \GeoData\Math
+ *
  * @group GeoData
  */
 class GeoDataMathTest extends MediaWikiTestCase {
/**
+* @covers \GeoData\Math::distance
 * @dataProvider getDistanceData
 */
public function testDistance( $lat1, $lon1, $lat2, $lon2, $dist, $name 
) {
@@ -29,6 +32,8 @@
}
 
/**
+* @covers \GeoData\Coord::bboxAround
+* @covers \GeoData\Math::wrapAround
 * @dataProvider getRectData
 * @todo: test directly now that this function is public
 */
diff --git a/tests/phpunit/GeoFeatureTest.php b/tests/phpunit/GeoFeatureTest.php
index 2799887..3a76901 100644
--- a/tests/phpunit/GeoFeatureTest.php
+++ b/tests/phpunit/GeoFeatureTest.php
@@ -11,7 +11,7 @@
 use Wikimedia\Rdbms\LoadBalancer;
 
 /**
- * Test GeoFeature functions.
+ * @covers \GeoData\CirrusGeoFeature
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -93,6 +93,7 @@
}
 
/**
+* @covers \GeoData\CirrusGeoFeature::parseDistance
 * @dataProvider parseDistanceProvider
 */
public function testParseDistance( $expected, $distance ) {
@@ -162,6 +163,7 @@
}
 
/**
+* @covers \GeoData\CirrusGeoFeature::parseGeoNearby
 * @dataProvider parseGeoNearbyProvider
 */
public function testParseGeoNearby( $expected, $value ) {
@@ -244,6 +246,7 @@
}
 
/**
+* @covers \GeoData\CirrusGeoFeature::parseGeoNearbyTitle
 * @dataProvider parseGeoNearbyTitleProvider