jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/383350 )
Change subject: Register PHPUnit tests via UnitTestsList hook
......................................................................
Register PHPUnit tests via UnitTestsList hook
Bug: T177672
Change-Id: Ieca8a54df476c5de22b4ceff303ea8b855b1e52a
---
M Collection.hooks.php
M Collection.php
2 files changed, 14 insertions(+), 0 deletions(-)
Approvals:
jenkins-bot: Verified
Phuedx: Looks good to me, approved
diff --git a/Collection.hooks.php b/Collection.hooks.php
index abd8ac6..d69e4ca 100644
--- a/Collection.hooks.php
+++ b/Collection.hooks.php
@@ -440,4 +440,17 @@
}
return true;
}
+
+ /**
+ * [UnitTestsList][0] hook handler.
+ *
+ * Registers the extension's PHPUnit tests.
+ *
+ * [0]: https://www.mediawiki.org/wiki/Manual:Hooks/UnitTestsList.
+ *
+ * @param array &$paths
+ */
+ public static function onUnitTestsList( array &$paths ) {
+ $paths[] = __DIR__ . '/tests/phpunit';
+ }
}
diff --git a/Collection.php b/Collection.php
index b3751e2..7b99e8f 100644
--- a/Collection.php
+++ b/Collection.php
@@ -228,6 +228,7 @@
$wgHooks['SidebarBeforeOutput'][] = 'CollectionHooks::buildSidebar';
$wgHooks['SiteNoticeAfter'][] = 'CollectionHooks::siteNoticeAfter';
$wgHooks['OutputPageCheckLastModified'][] =
'CollectionHooks::checkLastModified';
+$wgHooks['UnitTestsList'][] = 'CollectionHooks::onUnitTestsList';
$wgExtensionFunctions[] = 'CollectionHooks::onSetup';
$wgAvailableRights[] = 'collectionsaveasuserpage';
--
To view, visit https://gerrit.wikimedia.org/r/383350
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ieca8a54df476c5de22b4ceff303ea8b855b1e52a
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Collection
Gerrit-Branch: master
Gerrit-Owner: Phuedx <[email protected]>
Gerrit-Reviewer: C. Scott Ananian <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Phuedx <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits