Jeroen De Dauw has submitted this change and it was merged. Change subject: Revert "Remove obsolete test registration code" ......................................................................
Revert "Remove obsolete test registration code" Will commit better solution This reverts commit 214ba7da8d81cd63c79e7d74f65d1733bbf8914e Change-Id: I7cbd0e5052f50f8a7f48526c49aea330c4cfcf16 --- M Ask.mw.php 1 file changed, 42 insertions(+), 0 deletions(-) Approvals: Jeroen De Dauw: Verified; Looks good to me, approved diff --git a/Ask.mw.php b/Ask.mw.php index 4ed858f..f1093d7 100644 --- a/Ask.mw.php +++ b/Ask.mw.php @@ -28,6 +28,8 @@ * @author Jeroen De Dauw < [email protected] > */ +// @codeCoverageIgnoreStart + if ( !defined( 'MEDIAWIKI' ) ) { die( 'Not an entry point.' ); } @@ -41,3 +43,43 @@ if ( defined( 'MW_PHPUNIT_TEST' ) ) { require_once __DIR__ . '/Tests/testLoader.php'; } + +/** + * Hook to add PHPUnit test cases. + * @see https://www.mediawiki.org/wiki/Manual:Hooks/UnitTestsList + * + * TODO: register the Tests directory itself so this list does not need to be maintained + * + * @since 0.1 + * + * @param array $files + * + * @return boolean + */ +$wgHooks['UnitTestsList'][] = function( array &$files ) { + + $testFiles = array( + 'Language/Description/AnyValue', + 'Language/Description/Conjunction', + 'Language/Description/SomeProperty', + 'Language/Description/Disjunction', + 'Language/Description/ValueDescription', + + 'Language/Option/PropertyValueSortExpression', + 'Language/Option/QueryOptions', + 'Language/Option/SortOptions', + + 'Language/Selection/PropertySelection', + 'Language/Selection/SubjectSelection', + + 'Language/Query', + ); + + foreach ( $testFiles as $file ) { + $files[] = __DIR__ . '/Tests/Phpunit/' . $file . 'Test.php'; + } + + return true; +}; + +// @codeCoverageIgnoreEnd -- To view, visit https://gerrit.wikimedia.org/r/65815 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7cbd0e5052f50f8a7f48526c49aea330c4cfcf16 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Ask Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw <[email protected]> Gerrit-Reviewer: Jeroen De Dauw <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
