X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2FMediaWikiTestCase.php;h=4d3c37bda5801115485b0fab815c5d98c565b743;hp=91aaff523660ca3f2448594252bcb032e75b2105;hb=c8e482371407477ecd4f0a1b5778e565d3963a93;hpb=d19826aa35b206847a568a4b2c1c9ffaa615fca5 diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index 91aaff5236..4d3c37bda5 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -213,6 +213,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { * * @param Config|null $bootstrapConfig The bootstrap config to use with the new * MediaWikiServices. + * @return MediaWikiServices */ protected static function resetGlobalServices( Config $bootstrapConfig = null ) { $oldServices = MediaWikiServices::getInstance(); @@ -967,12 +968,13 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { * @since 1.18 */ public function needsDB() { - # if the test says it uses database tables, it needs the database + // If the test says it uses database tables, it needs the database if ( $this->tablesUsed ) { return true; } - # if the test says it belongs to the Database group, it needs the database + // If the test class says it belongs to the Database group, it needs the database. + // NOTE: This ONLY checks for the group in the class level doc comment. $rc = new ReflectionClass( $this ); if ( preg_match( '/@group +Database/im', $rc->getDocComment() ) ) { return true; @@ -1591,7 +1593,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { * * @since 1.20 * - * @param array $array + * @param array &$array */ protected function objectAssociativeSort( array &$array ) { uasort( @@ -1609,7 +1611,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { * * @since 1.20 * - * @param mixed $r The array to remove string keys from. + * @param mixed &$r The array to remove string keys from. */ protected static function stripStringKeys( &$r ) { if ( !is_array( $r ) ) { @@ -1832,6 +1834,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { /** * Used as a marker to prevent wfResetOutputBuffers from breaking PHPUnit. + * @param string $buffer * @return string */ public static function wfResetOutputBuffersBarrier( $buffer ) {