r91905 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91904‎ | r91905 | r91906 >
Date:19:48, 11 July 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
cleaned up unit tests
Modified paths:
  • /trunk/extensions/Maps/test/MapsCoordinateParserTest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/test/MapsCoordinateParserTest.php
@@ -82,15 +82,6 @@
8383 );
8484
8585 /**
86 - * Formatting tests.
87 - *
88 - * @var array
89 - */
90 - public static $formattingTests = array(
91 -
92 - );
93 -
94 - /**
9586 * Invalid coordinates.
9687 *
9788 * @var array
@@ -131,16 +122,9 @@
132123 }
133124
134125 /**
135 - * Constructs the test case.
136 - */
137 - public function __construct() {
138 - }
139 -
140 - /**
141126 * Tests MapsCoordinateParser::parseCoordinates()
142127 */
143128 public function testParseCoordinates() {
144 - // TODO Auto-generated MapsCoordinateParserTest::testParseCoordinates()
145129 foreach ( self::$fakeCoordinates as $coord ) {
146130 $this->assertFalse( MapsCoordinateParser::parseCoordinates( $coord ), "parseCoordinates did not return false for $coord." );
147131 }
@@ -172,22 +156,8 @@
173157
174158 }
175159
176 - /*
177 - public function coordinatesProvider() {
178 - die(__METHOD__);
179 - $coords = array();
180 -
181 - foreach( self::$coordinates as $coordsOfType ) {
182 - foreach( $coordsOfType as $coord ) {
183 - $coords[] = array( $coord );
184 - }
185 - }
186 - return $coords;
187 - }
188 - */
189 -
190160 /**
191 - * @dataProvider coordinatesProvider
 161+ * Tests MapsCoordinateParser::areCoordinates()
192162 */
193163 public function testAreCoordinates() {
194164 foreach( self::$coordinates as $coordsOfType ) {
@@ -202,28 +172,6 @@
203173 }
204174
205175 /**
206 - * Tests MapsCoordinateParser::formatCoordinates()
207 - */
208 - public function testFormatCoordinates() {
209 - // TODO Auto-generated MapsCoordinateParserTest::testFormatCoordinates()
210 - $this->markTestIncomplete ( "formatCoordinates test not implemented" );
211 -
212 - MapsCoordinateParser::formatCoordinates(/* parameters */);
213 -
214 - }
215 -
216 - /**
217 - * Tests MapsCoordinateParser::formatToArray()
218 - */
219 - public function testFormatToArray() {
220 - // TODO Auto-generated MapsCoordinateParserTest::testFormatToArray()
221 - $this->markTestIncomplete ( "formatToArray test not implemented" );
222 -
223 - MapsCoordinateParser::formatToArray(/* parameters */);
224 -
225 - }
226 -
227 - /**
228176 * Tests MapsCoordinateParser::areFloatCoordinates()
229177 */
230178 public function testAreFloatCoordinates() {
@@ -275,7 +223,6 @@
276224 * Tests MapsCoordinateParser::parseAndFormat()
277225 */
278226 public function testParseAndFormat() {
279 - // TODO Auto-generated MapsCoordinateParserTest::testParseAndFormat()
280227 foreach ( self::$fakeCoordinates as $coord ) {
281228 $this->assertFalse( MapsCoordinateParser::parseAndFormat( $coord ), "parseAndFormat did not return false for $coord." );
282229 }