r69390 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69389‎ | r69390 | r69391 >
Date:16:38, 15 July 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Added unit testing hook
Modified paths:
  • /trunk/extensions/Maps/Maps.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Maps.php
@@ -74,6 +74,8 @@
7575 $wgExtensionFunctions[] = 'efMapsSetup';
7676
7777 $wgHooks['AdminLinks'][] = 'efMapsAddToAdminLinks';
 78+
 79+ $wgHooks['UnitTestsList'][] = 'efMapsUnitTests';
7880 }
7981
8082 /**
@@ -162,4 +164,16 @@
163165 $smw_docu_row->addItem( AlItem::newFromExternalLink( 'http://www.mediawiki.org/wiki/Extension:Maps', $maps_docu_label ) );
164166
165167 return true;
 168+}
 169+
 170+/**
 171+ * Hook to add PHPUnit test cases.
 172+ *
 173+ * @since 0.6.5
 174+ *
 175+ * @param array $files
 176+ */
 177+function efMapsUnitTests( array &$files ) {
 178+ $testDir = dirname( __FILE__ ) . '/test/';
 179+ $files[] = $testDir . 'MapsCoordinateParserTest.php';
166180 }
\ No newline at end of file

Status & tagging log