Merge "Add missing @param and @return to documentation"
This commit is contained in:
commit
f88961cb8c
12 changed files with 24 additions and 1 deletions
|
|
@ -42,18 +42,21 @@ class TestRecorder {
|
|||
|
||||
/**
|
||||
* Called before starting a test
|
||||
* @param string $test
|
||||
*/
|
||||
public function startTest( $test ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called before starting an input file
|
||||
* @param string $path
|
||||
*/
|
||||
public function startSuite( $path ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called after ending an input file
|
||||
* @param string $path
|
||||
*/
|
||||
public function endSuite( $path ) {
|
||||
}
|
||||
|
|
@ -68,12 +71,15 @@ class TestRecorder {
|
|||
|
||||
/**
|
||||
* Show a warning to the user
|
||||
* @param string $message
|
||||
*/
|
||||
public function warning( $message ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark a test skipped
|
||||
* @param string $test
|
||||
* @param string $subtest
|
||||
*/
|
||||
public function skipped( $test, $subtest ) {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ trait HamcrestPHPUnitIntegration {
|
|||
/**
|
||||
* Wrapper around Hamcrest's assertThat, which marks the assertion
|
||||
* for PHPUnit so the test is not marked as risky
|
||||
* @param array ...$args
|
||||
*/
|
||||
public function assertThatHamcrest( ...$args ) {
|
||||
assertThat( ...$args );
|
||||
|
|
|
|||
|
|
@ -1528,6 +1528,7 @@ abstract class MediaWikiIntegrationTestCase extends PHPUnit\Framework\TestCase {
|
|||
* @throws LogicException if the given database connection is not a set up to use
|
||||
* mock tables.
|
||||
*
|
||||
* @param IDatabase $db
|
||||
* @since 1.31 this is no longer private.
|
||||
*/
|
||||
protected function ensureMockDatabaseConnection( IDatabase $db ) {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ trait MediaWikiTestCaseTrait {
|
|||
* which will throw if any unexpected method is called.
|
||||
*
|
||||
* @param mixed ...$values Values that are not matched
|
||||
* @return PHPUnit_Framework_Constraint
|
||||
*/
|
||||
protected function anythingBut( ...$values ) {
|
||||
return $this->logicalNot( $this->logicalOr(
|
||||
|
|
|
|||
|
|
@ -190,7 +190,10 @@ class ResourceLoaderFileTestModule extends ResourceLoaderFileModule {
|
|||
return $this->lessVars;
|
||||
}
|
||||
|
||||
/** @return array */
|
||||
/**
|
||||
* @param ResourceLoaderContext $context
|
||||
* @return array
|
||||
*/
|
||||
protected function getFileDependencies( ResourceLoaderContext $context ) {
|
||||
// No-op
|
||||
return [];
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ trait McrReadNewSchemaOverride {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param IMaintainableDatabase $db
|
||||
* @return array[]
|
||||
*/
|
||||
protected function getSchemaOverrides( IMaintainableDatabase $db ) {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ trait McrWriteBothSchemaOverride {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param IMaintainableDatabase $db
|
||||
* @return array[]
|
||||
*/
|
||||
protected function getSchemaOverrides( IMaintainableDatabase $db ) {
|
||||
|
|
|
|||
|
|
@ -956,6 +956,7 @@ abstract class RevisionStoreDbTestBase extends MediaWikiTestCase {
|
|||
* Conditions to use together with getSlotsQueryInfo() when selecting slot rows for a given
|
||||
* revision.
|
||||
*
|
||||
* @param int $revId
|
||||
* @return array
|
||||
*/
|
||||
abstract protected function getSlotRevisionConditions( $revId );
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ class TestUserRegistry {
|
|||
* @todo It would be nice if this were a non-static method of TestUser
|
||||
* instead, but that doesn't seem possible without friends?
|
||||
*
|
||||
* @param User $user
|
||||
* @return bool True if it's safe to modify the user
|
||||
*/
|
||||
public static function isMutable( User $user ) {
|
||||
|
|
|
|||
|
|
@ -215,6 +215,10 @@ abstract class ApiTestCase extends MediaWikiLangTestCase {
|
|||
* ApiUsageException::newWithMessage()'s parameters. This allows checking for an exception
|
||||
* whose text is given by a message key instead of text, so as not to hard-code the message's
|
||||
* text into test code.
|
||||
* @param string $msg
|
||||
* @param string|null $code
|
||||
* @param array|null $data
|
||||
* @param int $httpCode
|
||||
*/
|
||||
protected function setExpectedApiException(
|
||||
$msg, $code = null, array $data = null, $httpCode = 0
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ abstract class WikiPageDbTestBase extends MediaWikiLangTestCase {
|
|||
* @param string|Title|WikiPage $page
|
||||
* @param string|Content|Content[] $content
|
||||
* @param int|null $model
|
||||
* @param User|null $user
|
||||
*
|
||||
* @return WikiPage
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -207,6 +207,8 @@ abstract class DumpTestCase extends MediaWikiLangTestCase {
|
|||
|
||||
/**
|
||||
* Checks an XML file against an XSD schema.
|
||||
* @param string $fname
|
||||
* @param string $schemaFile
|
||||
*/
|
||||
protected function assertDumpSchema( $fname, $schemaFile ) {
|
||||
if ( !function_exists( 'libxml_use_internal_errors' ) ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue