Bsitu has uploaded a new change for review. https://gerrit.wikimedia.org/r/153458
Change subject: Add sub-directories to phpunit test ...................................................................... Add sub-directories to phpunit test Change-Id: Ie5bb127f1ba36bd799f87535b14cd3712ad08a3c --- M Hooks.php 1 file changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/58/153458/1 diff --git a/Hooks.php b/Hooks.php index 8eb741b..ed5e7bc 100644 --- a/Hooks.php +++ b/Hooks.php @@ -768,8 +768,22 @@ * @return bool true in all cases */ static function getUnitTests( &$files ) { - $files = array_merge( $files, glob( __DIR__ . '/tests/*Test.php' ) ); + // @codeCoverageIgnoreStart + $directoryIterator = new RecursiveDirectoryIterator( __DIR__ . '/tests/' ); + + /** + * @var SplFileInfo $fileInfo + */ + $ourFiles = array(); + foreach ( new RecursiveIteratorIterator( $directoryIterator ) as $fileInfo ) { + if ( substr( $fileInfo->getFilename(), -8 ) === 'Test.php' ) { + $ourFiles[] = $fileInfo->getPathname(); + } + } + + $files = array_merge( $files, $ourFiles ); return true; + // @codeCoverageIgnoreEnd } /** -- To view, visit https://gerrit.wikimedia.org/r/153458 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5bb127f1ba36bd799f87535b14cd3712ad08a3c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Bsitu <bs...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits