Merge "tests: Fix @covers and @coversDefaultClass to have leading \"
This commit is contained in:
commit
9e1588e07f
578 changed files with 1853 additions and 1853 deletions
|
|
@ -3,7 +3,7 @@
|
|||
use Wikimedia\TestingAccessWrapper;
|
||||
|
||||
/**
|
||||
* @covers AutoLoader
|
||||
* @covers \AutoLoader
|
||||
*/
|
||||
class AutoLoaderTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use MediaWiki\MainConfigNames;
|
|||
use MediaWiki\Title\Title;
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Category\Category
|
||||
* @covers \MediaWiki\Category\Category
|
||||
* @group Database
|
||||
* @group Category
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use MediaWiki\Page\PageReferenceValue;
|
|||
|
||||
/**
|
||||
* @covers \MediaWiki\Parser\ParserOutput
|
||||
* @covers CacheTime
|
||||
* @covers \CacheTime
|
||||
* @group Database
|
||||
* ^--- trigger DB shadowing because we are using Title magic
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use Wikimedia\Rdbms\IExpression;
|
|||
use Wikimedia\Rdbms\LikeMatch;
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\ExternalLinks\LinkFilter
|
||||
* @covers \MediaWiki\ExternalLinks\LinkFilter
|
||||
* @group Database
|
||||
*/
|
||||
class LinkFilterTest extends MediaWikiLangTestCase {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use MediaWiki\Html\HtmlJsCode;
|
|||
use MediaWiki\MainConfigNames;
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Html\Html
|
||||
* @covers \MediaWiki\Html\Html
|
||||
*/
|
||||
class HtmlTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use Wikimedia\Services\DestructibleService;
|
|||
use Wikimedia\Services\SalvageableService;
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\MediaWikiServices
|
||||
* @covers \MediaWiki\MediaWikiServices
|
||||
* @group Database
|
||||
* This test doesn't really make queries, but needs to be in the Database test to make sure
|
||||
* that storage isn't disabled on the original instance.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use Wikimedia\ParamValidator\ValidationException;
|
|||
|
||||
/**
|
||||
* @group Database
|
||||
* @covers MediaWiki\ParamValidator\TypeDef\TagsDef
|
||||
* @covers \MediaWiki\ParamValidator\TypeDef\TagsDef
|
||||
*/
|
||||
class TagsDefTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::getAdditionalSelfUrls
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::getAdditionalSelfUrls
|
||||
*/
|
||||
public function testGetAdditionalSelfUrlsRespectsUrlSettings() {
|
||||
$this->overrideConfigValues( [
|
||||
|
|
@ -86,7 +86,7 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider providerFalsePositiveBrowser
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::falsePositiveBrowser
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::falsePositiveBrowser
|
||||
*/
|
||||
public function testFalsePositiveBrowser( $ua, $expected ) {
|
||||
$actual = ContentSecurityPolicy::falsePositiveBrowser( $ua );
|
||||
|
|
@ -108,8 +108,8 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::addScriptSrc
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::makeCSPDirectives
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::addScriptSrc
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::makeCSPDirectives
|
||||
*/
|
||||
public function testAddScriptSrc() {
|
||||
$this->csp->addScriptSrc( 'https://example.com:71' );
|
||||
|
|
@ -122,8 +122,8 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::addStyleSrc
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::makeCSPDirectives
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::addStyleSrc
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::makeCSPDirectives
|
||||
*/
|
||||
public function testAddStyleSrc() {
|
||||
$this->csp->addStyleSrc( 'style.example.com' );
|
||||
|
|
@ -136,8 +136,8 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::addDefaultSrc
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::makeCSPDirectives
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::addDefaultSrc
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::makeCSPDirectives
|
||||
*/
|
||||
public function testAddDefaultSrc() {
|
||||
$this->csp->addDefaultSrc( '*.example.com' );
|
||||
|
|
@ -151,7 +151,7 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider providerMakeCSPDirectives
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::makeCSPDirectives
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::makeCSPDirectives
|
||||
*/
|
||||
public function testMakeCSPDirectives(
|
||||
$policy,
|
||||
|
|
@ -266,7 +266,7 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::makeCSPDirectives
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::makeCSPDirectives
|
||||
*/
|
||||
public function testMakeCSPDirectivesReportUri() {
|
||||
$actual = $this->csp->makeCSPDirectives(
|
||||
|
|
@ -278,7 +278,7 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::getHeaderName
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::getHeaderName
|
||||
*/
|
||||
public function testGetHeaderName() {
|
||||
$this->assertSame(
|
||||
|
|
@ -292,7 +292,7 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::getReportUri
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::getReportUri
|
||||
*/
|
||||
public function testGetReportUri() {
|
||||
$full = $this->csp->getReportUri( ContentSecurityPolicy::FULL_MODE );
|
||||
|
|
@ -313,7 +313,7 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider providerPrepareUrlForCSP
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::prepareUrlForCSP
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::prepareUrlForCSP
|
||||
*/
|
||||
public function testPrepareUrlForCSP( $url, $expected ) {
|
||||
$actual = $this->csp->prepareUrlForCSP( $url );
|
||||
|
|
@ -344,7 +344,7 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::escapeUrlForCSP
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::escapeUrlForCSP
|
||||
*/
|
||||
public function testEscapeUrlForCSP() {
|
||||
$escaped = $this->csp->escapeUrlForCSP( ',;%2B' );
|
||||
|
|
@ -353,7 +353,7 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider provideIsNonceRequired
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::isNonceRequired
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::isNonceRequired
|
||||
*/
|
||||
public function testIsNonceRequired( $main, $reportOnly, $expected ) {
|
||||
$this->overrideConfigValues( [
|
||||
|
|
@ -380,7 +380,7 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::getDirectives
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::getDirectives
|
||||
*/
|
||||
public function testGetDirectives() {
|
||||
$this->assertSame(
|
||||
|
|
@ -395,7 +395,7 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\ContentSecurityPolicy::sendHeaders
|
||||
* @covers \MediaWiki\Request\ContentSecurityPolicy::sendHeaders
|
||||
*/
|
||||
public function testSendHeaders() {
|
||||
$this->csp->sendHeaders();
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::__construct
|
||||
* @covers \MediaWiki\Request\FauxRequest::__construct
|
||||
*/
|
||||
public function testConstructInvalidSession() {
|
||||
$this->expectException( InvalidArgumentException::class );
|
||||
|
|
@ -22,7 +22,7 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::__construct
|
||||
* @covers \MediaWiki\Request\FauxRequest::__construct
|
||||
*/
|
||||
public function testConstructWithSession() {
|
||||
$session = SessionManager::singleton()->getEmptySession( new FauxRequest( [] ) );
|
||||
|
|
@ -33,7 +33,7 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::getText
|
||||
* @covers \MediaWiki\Request\FauxRequest::getText
|
||||
*/
|
||||
public function testGetText() {
|
||||
$req = new FauxRequest( [ 'x' => 'Value' ] );
|
||||
|
|
@ -43,7 +43,7 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* Integration test for parent method
|
||||
* @covers MediaWiki\Request\FauxRequest::getVal
|
||||
* @covers \MediaWiki\Request\FauxRequest::getVal
|
||||
*/
|
||||
public function testGetVal() {
|
||||
$req = new FauxRequest( [ 'crlf' => "A\r\nb" ] );
|
||||
|
|
@ -52,7 +52,7 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* Integration test for parent method
|
||||
* @covers MediaWiki\Request\FauxRequest::getRawVal
|
||||
* @covers \MediaWiki\Request\FauxRequest::getRawVal
|
||||
*/
|
||||
public function testGetRawVal() {
|
||||
$req = new FauxRequest( [
|
||||
|
|
@ -67,7 +67,7 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::getValues
|
||||
* @covers \MediaWiki\Request\FauxRequest::getValues
|
||||
*/
|
||||
public function testGetValues() {
|
||||
$values = [ 'x' => 'Value', 'y' => '' ];
|
||||
|
|
@ -76,7 +76,7 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::getQueryValues
|
||||
* @covers \MediaWiki\Request\FauxRequest::getQueryValues
|
||||
*/
|
||||
public function testGetQueryValues() {
|
||||
$values = [ 'x' => 'Value', 'y' => '' ];
|
||||
|
|
@ -88,7 +88,7 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::getMethod
|
||||
* @covers \MediaWiki\Request\FauxRequest::getMethod
|
||||
*/
|
||||
public function testGetMethod() {
|
||||
$req = new FauxRequest( [] );
|
||||
|
|
@ -98,7 +98,7 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::wasPosted
|
||||
* @covers \MediaWiki\Request\FauxRequest::wasPosted
|
||||
*/
|
||||
public function testWasPosted() {
|
||||
$req = new FauxRequest( [] );
|
||||
|
|
@ -108,9 +108,9 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::getCookie
|
||||
* @covers MediaWiki\Request\FauxRequest::setCookie
|
||||
* @covers MediaWiki\Request\FauxRequest::setCookies
|
||||
* @covers \MediaWiki\Request\FauxRequest::getCookie
|
||||
* @covers \MediaWiki\Request\FauxRequest::setCookie
|
||||
* @covers \MediaWiki\Request\FauxRequest::setCookies
|
||||
*/
|
||||
public function testCookies() {
|
||||
$req = new FauxRequest();
|
||||
|
|
@ -125,9 +125,9 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::getCookie
|
||||
* @covers MediaWiki\Request\FauxRequest::setCookie
|
||||
* @covers MediaWiki\Request\FauxRequest::setCookies
|
||||
* @covers \MediaWiki\Request\FauxRequest::getCookie
|
||||
* @covers \MediaWiki\Request\FauxRequest::setCookie
|
||||
* @covers \MediaWiki\Request\FauxRequest::setCookies
|
||||
*/
|
||||
public function testCookiesDefaultPrefix() {
|
||||
global $wgCookiePrefix;
|
||||
|
|
@ -144,7 +144,7 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::getRequestURL
|
||||
* @covers \MediaWiki\Request\FauxRequest::getRequestURL
|
||||
*/
|
||||
public function testGetRequestURL_disallowed() {
|
||||
$req = new FauxRequest();
|
||||
|
|
@ -153,8 +153,8 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::setRequestURL
|
||||
* @covers MediaWiki\Request\FauxRequest::getRequestURL
|
||||
* @covers \MediaWiki\Request\FauxRequest::setRequestURL
|
||||
* @covers \MediaWiki\Request\FauxRequest::getRequestURL
|
||||
*/
|
||||
public function testSetRequestURL() {
|
||||
$req = new FauxRequest();
|
||||
|
|
@ -163,7 +163,7 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::getFullRequestURL
|
||||
* @covers \MediaWiki\Request\FauxRequest::getFullRequestURL
|
||||
*/
|
||||
public function testGetFullRequestURL_disallowed() {
|
||||
$req = new FauxRequest();
|
||||
|
|
@ -173,7 +173,7 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::getFullRequestURL
|
||||
* @covers \MediaWiki\Request\FauxRequest::getFullRequestURL
|
||||
*/
|
||||
public function testGetFullRequestURL_http() {
|
||||
$req = new FauxRequest();
|
||||
|
|
@ -186,7 +186,7 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::getFullRequestURL
|
||||
* @covers \MediaWiki\Request\FauxRequest::getFullRequestURL
|
||||
*/
|
||||
public function testGetFullRequestURL_https() {
|
||||
$req = new FauxRequest( [], false, null, 'https' );
|
||||
|
|
@ -199,8 +199,8 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::__construct
|
||||
* @covers MediaWiki\Request\FauxRequest::getProtocol
|
||||
* @covers \MediaWiki\Request\FauxRequest::__construct
|
||||
* @covers \MediaWiki\Request\FauxRequest::getProtocol
|
||||
*/
|
||||
public function testProtocol() {
|
||||
$req = new FauxRequest();
|
||||
|
|
@ -212,9 +212,9 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::setHeader
|
||||
* @covers MediaWiki\Request\FauxRequest::setHeaders
|
||||
* @covers MediaWiki\Request\FauxRequest::getHeader
|
||||
* @covers \MediaWiki\Request\FauxRequest::setHeader
|
||||
* @covers \MediaWiki\Request\FauxRequest::setHeaders
|
||||
* @covers \MediaWiki\Request\FauxRequest::getHeader
|
||||
*/
|
||||
public function testGetSetHeader() {
|
||||
$value = 'text/plain, text/html';
|
||||
|
|
@ -233,7 +233,7 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::initHeaders
|
||||
* @covers \MediaWiki\Request\FauxRequest::initHeaders
|
||||
*/
|
||||
public function testGetAllHeaders() {
|
||||
$_SERVER['HTTP_TEST'] = 'Example';
|
||||
|
|
@ -245,8 +245,8 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::__construct
|
||||
* @covers MediaWiki\Request\FauxRequest::getSessionArray
|
||||
* @covers \MediaWiki\Request\FauxRequest::__construct
|
||||
* @covers \MediaWiki\Request\FauxRequest::getSessionArray
|
||||
*/
|
||||
public function testSessionData() {
|
||||
$values = [ 'x' => 'Value', 'y' => '' ];
|
||||
|
|
@ -259,7 +259,7 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::getPostValues
|
||||
* @covers \MediaWiki\Request\FauxRequest::getPostValues
|
||||
*/
|
||||
public function testGetPostValues() {
|
||||
$values = [ 'x' => 'Value', 'y' => '' ];
|
||||
|
|
@ -272,9 +272,9 @@ class FauxRequestTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\FauxRequest::getRawQueryString
|
||||
* @covers MediaWiki\Request\FauxRequest::getRawPostString
|
||||
* @covers MediaWiki\Request\FauxRequest::getRawInput
|
||||
* @covers \MediaWiki\Request\FauxRequest::getRawQueryString
|
||||
* @covers \MediaWiki\Request\FauxRequest::getRawPostString
|
||||
* @covers \MediaWiki\Request\FauxRequest::getRawInput
|
||||
*/
|
||||
public function testDummies() {
|
||||
$req = new FauxRequest();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
use MediaWiki\Request\WebResponse;
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Request\WebResponse
|
||||
* @covers \MediaWiki\Request\WebResponse
|
||||
*
|
||||
* @group WebRequest
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use Wikimedia\Rdbms\Platform\ISQLPlatform;
|
|||
class SiteStatsTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\SiteStats\SiteStats::jobs
|
||||
* @covers \MediaWiki\SiteStats\SiteStats::jobs
|
||||
*/
|
||||
public function testJobsCountGetCached() {
|
||||
$cache = new WANObjectCache( [ 'cache' => new HashBagOStuff() ] );
|
||||
|
|
@ -39,7 +39,7 @@ class SiteStatsTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\SiteStats\SiteStats
|
||||
* @covers \MediaWiki\SiteStats\SiteStats
|
||||
*/
|
||||
public function testInit() {
|
||||
$this->db->delete( 'site_stats', ISQLPlatform::ALL_ROWS, __METHOD__ );
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use Wikimedia\Message\MessageValue;
|
|||
use Wikimedia\TestingAccessWrapper;
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Status\StatusFormatter
|
||||
* @covers \MediaWiki\Status\StatusFormatter
|
||||
*/
|
||||
class StatusFormatterTest extends MediaWikiLangTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -724,7 +724,7 @@ class StatusTest extends MediaWikiLangTestCase {
|
|||
/**
|
||||
* @dataProvider provideErrorsWarningsOnly
|
||||
* @covers \MediaWiki\Status\Status::splitByErrorType
|
||||
* @covers StatusValue::splitByErrorType
|
||||
* @covers \StatusValue::splitByErrorType
|
||||
*/
|
||||
public function testGetErrorsWarningsOnlyStatus( $errorText, $warningText, $type, $errorResult,
|
||||
$warningResult
|
||||
|
|
|
|||
|
|
@ -1279,7 +1279,7 @@ class DerivedPageDataUpdaterTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* @covers \MediaWiki\Storage\DerivedPageDataUpdater::doParserCacheUpdate()
|
||||
* @covers ParsoidCachePrewarmJob::doParsoidCacheUpdate()
|
||||
* @covers \ParsoidCachePrewarmJob::doParsoidCacheUpdate()
|
||||
*/
|
||||
public function testDoParserCacheUpdate() {
|
||||
$this->overrideConfigValue(
|
||||
|
|
@ -1374,7 +1374,7 @@ class DerivedPageDataUpdaterTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* @covers \MediaWiki\Storage\DerivedPageDataUpdater::doParserCacheUpdate()
|
||||
* @covers ParsoidCachePrewarmJob::doParsoidCacheUpdate()
|
||||
* @covers \ParsoidCachePrewarmJob::doParsoidCacheUpdate()
|
||||
*/
|
||||
public function testDoParserCacheUpdateForJavaScriptContent() {
|
||||
$this->overrideConfigValue(
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use Wikimedia\Rdbms\ILBFactory;
|
|||
use Wikimedia\Rdbms\ILoadBalancer;
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Storage\NameTableStoreFactory
|
||||
* @covers \MediaWiki\Storage\NameTableStoreFactory
|
||||
* @group Database
|
||||
*/
|
||||
class NameTableStoreFactoryTest extends MediaWikiIntegrationTestCase {
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ use MediaWikiIntegrationTestCase;
|
|||
use TextContent;
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\Storage\PageUpdaterFactory
|
||||
* @covers \MediaWiki\Storage\PageUpdaterFactory
|
||||
* @group Database
|
||||
*/
|
||||
class PageUpdaterFactoryIntegrationTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
/**
|
||||
* @covers WikiPage::newPageUpdater
|
||||
* @covers \WikiPage::newPageUpdater
|
||||
*/
|
||||
public function testNewPageUpdater() {
|
||||
$page = $this->getExistingTestPage();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use MediaWiki\WikiMap\WikiReference;
|
|||
use Wikimedia\Rdbms\DatabaseDomain;
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\WikiMap\WikiMap
|
||||
* @covers \MediaWiki\WikiMap\WikiMap
|
||||
*
|
||||
* @group Database
|
||||
*/
|
||||
|
|
@ -187,7 +187,7 @@ class WikiMapTest extends MediaWikiLangTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\WikiMap\WikiMap::getCanonicalServerInfoForAllWikis()
|
||||
* @covers \MediaWiki\WikiMap\WikiMap::getCanonicalServerInfoForAllWikis()
|
||||
*/
|
||||
public function testGetCanonicalServerInfoForAllWikis() {
|
||||
$expected = [
|
||||
|
|
@ -234,7 +234,7 @@ class WikiMapTest extends MediaWikiLangTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider provideGetWikiFromUrl
|
||||
* @covers MediaWiki\WikiMap\WikiMap::getWikiFromUrl()
|
||||
* @covers \MediaWiki\WikiMap\WikiMap::getWikiFromUrl()
|
||||
*/
|
||||
public function testGetWikiFromUrl( $url, $wiki ) {
|
||||
$this->assertEquals( $wiki, WikiMap::getWikiFromUrl( $url ) );
|
||||
|
|
@ -254,15 +254,15 @@ class WikiMapTest extends MediaWikiLangTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider provideGetWikiIdFromDbDomain
|
||||
* @covers MediaWiki\WikiMap\WikiMap::getWikiIdFromDbDomain()
|
||||
* @covers \MediaWiki\WikiMap\WikiMap::getWikiIdFromDbDomain()
|
||||
*/
|
||||
public function testGetWikiIdFromDbDomain( $domain, $wikiId ) {
|
||||
$this->assertEquals( $wikiId, WikiMap::getWikiIdFromDbDomain( $domain ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers MediaWiki\WikiMap\WikiMap::isCurrentWikiDbDomain()
|
||||
* @covers MediaWiki\WikiMap\WikiMap::getCurrentWikiDbDomain()
|
||||
* @covers \MediaWiki\WikiMap\WikiMap::isCurrentWikiDbDomain()
|
||||
* @covers \MediaWiki\WikiMap\WikiMap::getCurrentWikiDbDomain()
|
||||
*/
|
||||
public function testIsCurrentWikiDomain() {
|
||||
$this->overrideConfigValue( MainConfigNames::DBmwschema, 'mediawiki' );
|
||||
|
|
@ -301,9 +301,9 @@ class WikiMapTest extends MediaWikiLangTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider provideIsCurrentWikiId
|
||||
* @covers MediaWiki\WikiMap\WikiMap::isCurrentWikiId()
|
||||
* @covers MediaWiki\WikiMap\WikiMap::getCurrentWikiDbDomain()
|
||||
* @covers MediaWiki\WikiMap\WikiMap::getWikiIdFromDbDomain()
|
||||
* @covers \MediaWiki\WikiMap\WikiMap::isCurrentWikiId()
|
||||
* @covers \MediaWiki\WikiMap\WikiMap::getCurrentWikiDbDomain()
|
||||
* @covers \MediaWiki\WikiMap\WikiMap::getWikiIdFromDbDomain()
|
||||
*/
|
||||
public function testIsCurrentWikiId( $wikiId, $db, $schema, $prefix ) {
|
||||
$this->overrideConfigValues( [
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ use WikiPage;
|
|||
|
||||
/**
|
||||
* @group Database
|
||||
* @covers MediaWiki\Actions\ActionEntryPoint
|
||||
* @covers \MediaWiki\Actions\ActionEntryPoint
|
||||
*/
|
||||
class ActionEntryPointTest extends MediaWikiIntegrationTestCase {
|
||||
protected function setUp(): void {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use MediaWiki\Title\Title;
|
|||
use MediaWiki\User\User;
|
||||
|
||||
/**
|
||||
* @covers Action
|
||||
* @covers \Action
|
||||
*
|
||||
* @group Action
|
||||
* @group Database
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ use MediaWikiIntegrationTestCase;
|
|||
use RollbackAction;
|
||||
|
||||
/**
|
||||
* @covers RollbackAction
|
||||
* @covers \RollbackAction
|
||||
* @group Database
|
||||
* @package MediaWiki\Tests\Action
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ use Wikimedia\TestingAccessWrapper;
|
|||
use Wikimedia\Timestamp\ConvertibleTimestamp;
|
||||
|
||||
/**
|
||||
* @covers WatchAction
|
||||
* @covers \WatchAction
|
||||
*
|
||||
* @group Action
|
||||
*/
|
||||
|
|
@ -73,28 +73,28 @@ class WatchActionTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers WatchAction::getName()
|
||||
* @covers \WatchAction::getName()
|
||||
*/
|
||||
public function testGetName() {
|
||||
$this->assertEquals( 'watch', $this->watchAction->getName() );
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers WatchAction::requiresUnblock()
|
||||
* @covers \WatchAction::requiresUnblock()
|
||||
*/
|
||||
public function testRequiresUnlock() {
|
||||
$this->assertFalse( $this->watchAction->requiresUnblock() );
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers WatchAction::doesWrites()
|
||||
* @covers \WatchAction::doesWrites()
|
||||
*/
|
||||
public function testDoesWrites() {
|
||||
$this->assertTrue( $this->watchAction->doesWrites() );
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers WatchAction::onSubmit()
|
||||
* @covers \WatchAction::onSubmit()
|
||||
*/
|
||||
public function testOnSubmit() {
|
||||
/** @var Status $actual */
|
||||
|
|
@ -104,7 +104,7 @@ class WatchActionTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers WatchAction::onSubmit()
|
||||
* @covers \WatchAction::onSubmit()
|
||||
*/
|
||||
public function testOnSubmitHookAborted() {
|
||||
// WatchlistExpiry feature flag.
|
||||
|
|
@ -149,7 +149,7 @@ class WatchActionTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers WatchAction::checkCanExecute()
|
||||
* @covers \WatchAction::checkCanExecute()
|
||||
*/
|
||||
public function testShowUserNotLoggedIn() {
|
||||
$notLoggedInUser = new User();
|
||||
|
|
@ -165,7 +165,7 @@ class WatchActionTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers WatchAction::checkCanExecute()
|
||||
* @covers \WatchAction::checkCanExecute()
|
||||
*/
|
||||
public function testShowUserLoggedInNoException() {
|
||||
$this->setService( 'PermissionManager', $this->createMock( PermissionManager::class ) );
|
||||
|
|
@ -190,7 +190,7 @@ class WatchActionTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers WatchAction::onSuccess()
|
||||
* @covers \WatchAction::onSuccess()
|
||||
*/
|
||||
public function testOnSuccessMainNamespaceTitle() {
|
||||
/** @var MockObject|IContextSource $testContext */
|
||||
|
|
@ -215,7 +215,7 @@ class WatchActionTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers WatchAction::onSuccess()
|
||||
* @covers \WatchAction::onSuccess()
|
||||
*/
|
||||
public function testOnSuccessTalkPage() {
|
||||
/** @var MockObject|IContextSource $testContext */
|
||||
|
|
@ -348,7 +348,7 @@ class WatchActionTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers WatchAction::getExpiryOptions()
|
||||
* @covers \WatchAction::getExpiryOptions()
|
||||
*/
|
||||
public function testGetExpiryOptions() {
|
||||
// Fake current time to be 2020-06-10T00:00:00Z
|
||||
|
|
@ -425,7 +425,7 @@ class WatchActionTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers WatchAction::getExpiryOptions()
|
||||
* @covers \WatchAction::getExpiryOptions()
|
||||
*/
|
||||
public function testGetExpiryOptionsWithInvalidTranslations() {
|
||||
$mockMessageLocalizer = $this->createMock( MockMessageLocalizer::class );
|
||||
|
|
@ -447,7 +447,7 @@ class WatchActionTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers WatchAction::getExpiryOptions()
|
||||
* @covers \WatchAction::getExpiryOptions()
|
||||
*/
|
||||
public function testGetExpiryOptionsWithPartialInvalidTranslations() {
|
||||
$mockMessageLocalizer = $this->createMock( MockMessageLocalizer::class );
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use MediaWiki\User\TempUser\TempUserCreator;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiAcquireTempUserName
|
||||
* @covers \ApiAcquireTempUserName
|
||||
*/
|
||||
class ApiAcquireTempUserNameTest extends ApiTestCase {
|
||||
use MockAuthorityTrait;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ use Wikimedia\TestingAccessWrapper;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiBase
|
||||
* @covers \ApiBase
|
||||
*/
|
||||
class ApiBaseTest extends ApiTestCase {
|
||||
|
||||
|
|
@ -1574,7 +1574,7 @@ class ApiBaseTest extends ApiTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiBase::extractRequestParams
|
||||
* @covers \ApiBase::extractRequestParams
|
||||
*/
|
||||
public function testExtractRequestParams() {
|
||||
$request = new FauxRequest( [
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use MediaWiki\Tests\Unit\DummyServicesTrait;
|
|||
use Wikimedia\TestingAccessWrapper;
|
||||
|
||||
/**
|
||||
* @covers ApiBlockInfoTrait
|
||||
* @covers \ApiBlockInfoTrait
|
||||
*/
|
||||
class ApiBlockInfoTraitTest extends MediaWikiIntegrationTestCase {
|
||||
use DummyServicesTrait;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use MediaWiki\Utils\MWTimestamp;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiBlock
|
||||
* @covers \ApiBlock
|
||||
*/
|
||||
class ApiBlockTest extends ApiTestCase {
|
||||
use MockAuthorityTrait;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use MediaWiki\Request\FauxRequest;
|
|||
/**
|
||||
* @group API
|
||||
* @group medium
|
||||
* @covers ApiCSPReport
|
||||
* @covers \ApiCSPReport
|
||||
*/
|
||||
class ApiCSPReportTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use MediaWiki\Title\Title;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiChangeContentModel
|
||||
* @covers \ApiChangeContentModel
|
||||
* @author DannyS712
|
||||
*/
|
||||
class ApiChangeContentModelTest extends ApiTestCase {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use MediaWiki\Session\Token;
|
|||
/**
|
||||
* @group API
|
||||
* @group medium
|
||||
* @covers ApiCheckToken
|
||||
* @covers \ApiCheckToken
|
||||
*/
|
||||
class ApiCheckTokenTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use MediaWiki\User\UserIdentityValue;
|
|||
* @group API
|
||||
* @group medium
|
||||
* @group Database
|
||||
* @covers ApiClearHasMsg
|
||||
* @covers \ApiClearHasMsg
|
||||
*/
|
||||
class ApiClearHasMsgTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use MediaWiki\Title\TitleValue;
|
|||
* @group API
|
||||
* @group Database
|
||||
* @group medium
|
||||
* @covers ApiComparePages
|
||||
* @covers \ApiComparePages
|
||||
*/
|
||||
class ApiComparePagesTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use MediaWiki\Context\RequestContext;
|
|||
use MediaWiki\Request\FauxRequest;
|
||||
|
||||
/**
|
||||
* @covers ApiContinuationManager
|
||||
* @covers \ApiContinuationManager
|
||||
* @group API
|
||||
*/
|
||||
class ApiContinuationManagerTest extends ApiTestCase {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use MediaWiki\User\User;
|
|||
use Wikimedia\TestingAccessWrapper;
|
||||
|
||||
/**
|
||||
* @covers ApiCreateTempUserTrait
|
||||
* @covers \ApiCreateTempUserTrait
|
||||
*/
|
||||
class ApiCreateTempUserTraitTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use MediaWiki\User\User;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiDelete
|
||||
* @covers \ApiDelete
|
||||
*/
|
||||
class ApiDeleteTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @group API
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiDisabled
|
||||
* @covers \ApiDisabled
|
||||
*/
|
||||
class ApiDisabledTest extends ApiTestCase {
|
||||
public function testDisabled() {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ use MediaWiki\Utils\MWTimestamp;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiEditPage
|
||||
* @covers \ApiEditPage
|
||||
*/
|
||||
class ApiEditPageTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use Wikimedia\TestingAccessWrapper;
|
|||
class ApiErrorFormatterTest extends MediaWikiLangTestCase {
|
||||
|
||||
/**
|
||||
* @covers ApiErrorFormatter
|
||||
* @covers \ApiErrorFormatter
|
||||
*/
|
||||
public function testErrorFormatterBasics() {
|
||||
$result = new ApiResult( 8_388_608 );
|
||||
|
|
@ -37,8 +37,8 @@ class ApiErrorFormatterTest extends MediaWikiLangTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiErrorFormatter
|
||||
* @covers ApiErrorFormatter_BackCompat
|
||||
* @covers \ApiErrorFormatter
|
||||
* @covers \ApiErrorFormatter_BackCompat
|
||||
*/
|
||||
public function testNewWithFormat() {
|
||||
$result = new ApiResult( 8_388_608 );
|
||||
|
|
@ -58,7 +58,7 @@ class ApiErrorFormatterTest extends MediaWikiLangTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiErrorFormatter
|
||||
* @covers \ApiErrorFormatter
|
||||
* @dataProvider provideErrorFormatter
|
||||
*/
|
||||
public function testErrorFormatter( $format, $lang, $useDB,
|
||||
|
|
@ -398,7 +398,7 @@ class ApiErrorFormatterTest extends MediaWikiLangTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiErrorFormatter_BackCompat
|
||||
* @covers \ApiErrorFormatter_BackCompat
|
||||
*/
|
||||
public function testErrorFormatterBC() {
|
||||
$aboutpage = wfMessage( 'aboutpage' );
|
||||
|
|
@ -594,8 +594,8 @@ class ApiErrorFormatterTest extends MediaWikiLangTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider provideGetMessageFromException
|
||||
* @covers ApiErrorFormatter::getMessageFromException
|
||||
* @covers ApiErrorFormatter::formatException
|
||||
* @covers \ApiErrorFormatter::getMessageFromException
|
||||
* @covers \ApiErrorFormatter::formatException
|
||||
* @param Exception $exception
|
||||
* @param array $options
|
||||
* @param array $expect
|
||||
|
|
@ -622,7 +622,7 @@ class ApiErrorFormatterTest extends MediaWikiLangTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider provideGetMessageFromException
|
||||
* @covers ApiErrorFormatter_BackCompat::formatException
|
||||
* @covers \ApiErrorFormatter_BackCompat::formatException
|
||||
* @param Exception $exception
|
||||
* @param array $options
|
||||
* @param array $expect
|
||||
|
|
@ -691,9 +691,9 @@ class ApiErrorFormatterTest extends MediaWikiLangTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiErrorFormatter::addMessagesFromStatus
|
||||
* @covers ApiErrorFormatter::addWarningOrError
|
||||
* @covers ApiErrorFormatter::formatMessageInternal
|
||||
* @covers \ApiErrorFormatter::addMessagesFromStatus
|
||||
* @covers \ApiErrorFormatter::addWarningOrError
|
||||
* @covers \ApiErrorFormatter::formatMessageInternal
|
||||
*/
|
||||
public function testAddMessagesFromStatus_filter() {
|
||||
$result = new ApiResult( 8_388_608 );
|
||||
|
|
@ -733,7 +733,7 @@ class ApiErrorFormatterTest extends MediaWikiLangTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider provideIsValidApiCode
|
||||
* @covers ApiErrorFormatter::isValidApiCode
|
||||
* @covers \ApiErrorFormatter::isValidApiCode
|
||||
* @param string $code
|
||||
* @param bool $expect
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use Wikimedia\TestingAccessWrapper;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiLogin
|
||||
* @covers \ApiLogin
|
||||
*/
|
||||
class ApiLoginTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use MediaWiki\User\User;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiLogout
|
||||
* @covers \ApiLogout
|
||||
*/
|
||||
class ApiLogoutTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ use Wikimedia\Timestamp\ConvertibleTimestamp;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiMain
|
||||
* @covers \ApiMain
|
||||
*/
|
||||
class ApiMainTest extends ApiTestCase {
|
||||
use MockAuthorityTrait;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class ApiMessageTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiMessageTrait
|
||||
* @covers \ApiMessageTrait
|
||||
* @dataProvider provideCodeDefaults
|
||||
*/
|
||||
public function testCodeDefaults( $msg, $expectedCode ) {
|
||||
|
|
@ -46,7 +46,7 @@ class ApiMessageTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiMessageTrait
|
||||
* @covers \ApiMessageTrait
|
||||
* @dataProvider provideInvalidCode
|
||||
*/
|
||||
public function testInvalidCode( $code ) {
|
||||
|
|
@ -77,8 +77,8 @@ class ApiMessageTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiMessage
|
||||
* @covers ApiMessageTrait
|
||||
* @covers \ApiMessage
|
||||
* @covers \ApiMessageTrait
|
||||
*/
|
||||
public function testApiMessage() {
|
||||
$msg = new Message( [ 'foo', 'bar' ], [ 'baz' ] );
|
||||
|
|
@ -119,8 +119,8 @@ class ApiMessageTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiRawMessage
|
||||
* @covers ApiMessageTrait
|
||||
* @covers \ApiRawMessage
|
||||
* @covers \ApiMessageTrait
|
||||
*/
|
||||
public function testApiRawMessage() {
|
||||
$msg = new RawMessage( 'foo', [ 'baz' ] );
|
||||
|
|
@ -160,7 +160,7 @@ class ApiMessageTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiMessage::create
|
||||
* @covers \ApiMessage::create
|
||||
*/
|
||||
public function testApiMessageCreate() {
|
||||
$this->assertInstanceOf( ApiMessage::class, ApiMessage::create( new Message( 'mainpage' ) ) );
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use MediaWiki\User\User;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiMove
|
||||
* @covers \ApiMove
|
||||
*/
|
||||
class ApiMoveTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use Wikimedia\ParamValidator\ParamValidator;
|
|||
/**
|
||||
* TODO convert to unit test, no integration is needed
|
||||
*
|
||||
* @covers ApiOpenSearch
|
||||
* @covers \ApiOpenSearch
|
||||
*/
|
||||
class ApiOpenSearchTest extends MediaWikiIntegrationTestCase {
|
||||
public function testGetAllowedParams() {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use PHPUnit\Framework\MockObject\MockObject;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiOptions
|
||||
* @covers \ApiOptions
|
||||
*/
|
||||
class ApiOptionsTest extends ApiTestCase {
|
||||
use MockAuthorityTrait;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ use Wikimedia\TestingAccessWrapper;
|
|||
* @group API
|
||||
* @group medium
|
||||
* @group Database
|
||||
* @covers ApiPageSet
|
||||
* @covers \ApiPageSet
|
||||
*/
|
||||
class ApiPageSetTest extends ApiTestCase {
|
||||
use DummyServicesTrait;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ use MediaWiki\Title\TitleValue;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiParse
|
||||
* @covers \ApiParse
|
||||
*/
|
||||
class ApiParseTest extends ApiTestCase {
|
||||
use DummyServicesTrait;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use MediaWiki\Title\Title;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiProtect
|
||||
* @covers \ApiProtect
|
||||
*/
|
||||
class ApiProtectTest extends ApiTestCase {
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ class ApiProtectTest extends ApiTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiProtect::execute()
|
||||
* @covers \ApiProtect::execute()
|
||||
*/
|
||||
public function testProtectWithWatch(): void {
|
||||
$title = Title::makeTitle( NS_MAIN, 'TestProtectWithWatch' );
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use MediaWiki\Permissions\PermissionStatus;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiPurge
|
||||
* @covers \ApiPurge
|
||||
*/
|
||||
class ApiPurgeTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
use MediaWiki\Title\Title;
|
||||
|
||||
/**
|
||||
* @covers ApiResult
|
||||
* @covers \ApiResult
|
||||
* @group API
|
||||
*/
|
||||
class ApiResultTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
/**
|
||||
* @covers ApiResult
|
||||
* @covers \ApiResult
|
||||
*/
|
||||
public function testStaticDataMethods() {
|
||||
$arr = [];
|
||||
|
|
@ -234,7 +234,7 @@ class ApiResultTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiResult
|
||||
* @covers \ApiResult
|
||||
*/
|
||||
public function testInstanceDataMethods() {
|
||||
$result = new ApiResult( 8_388_608 );
|
||||
|
|
@ -537,7 +537,7 @@ class ApiResultTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiResult
|
||||
* @covers \ApiResult
|
||||
*/
|
||||
public function testMetadata() {
|
||||
$arr = [ 'foo' => [ 'bar' => [] ] ];
|
||||
|
|
@ -602,7 +602,7 @@ class ApiResultTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiResult
|
||||
* @covers \ApiResult
|
||||
*/
|
||||
public function testUtilityFunctions() {
|
||||
$arr = [
|
||||
|
|
@ -691,7 +691,7 @@ class ApiResultTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiResult
|
||||
* @covers \ApiResult
|
||||
* @dataProvider provideTransformations
|
||||
* @param string $label
|
||||
* @param array $input
|
||||
|
|
@ -1257,7 +1257,7 @@ class ApiResultTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiResult
|
||||
* @covers \ApiResult
|
||||
*/
|
||||
public function testAddMetadataToResultVars() {
|
||||
$arr = [
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use MediaWiki\Title\Title;
|
|||
|
||||
/**
|
||||
* Tests for action=revisiondelete
|
||||
* @covers APIRevisionDelete
|
||||
* @covers \APIRevisionDelete
|
||||
* @group API
|
||||
* @group medium
|
||||
* @group Database
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use MediaWiki\Title\Title;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiRollback
|
||||
* @covers \ApiRollback
|
||||
*/
|
||||
class ApiRollbackTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/**
|
||||
* @author Addshore
|
||||
* @covers ApiSetNotificationTimestamp
|
||||
* @covers \ApiSetNotificationTimestamp
|
||||
* @group API
|
||||
* @group medium
|
||||
* @group Database
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use Wikimedia\TestingAccessWrapper;
|
|||
use Wikimedia\Timestamp\ConvertibleTimestamp;
|
||||
|
||||
/**
|
||||
* @covers ApiStashEdit
|
||||
* @covers \ApiStashEdit
|
||||
* @covers \MediaWiki\Storage\PageEditStash
|
||||
* @group API
|
||||
* @group medium
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use MediaWiki\User\User;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiUnblock
|
||||
* @covers \ApiUnblock
|
||||
*/
|
||||
class ApiUnblockTest extends ApiTestCase {
|
||||
/** @var User */
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use MediaWiki\Title\Title;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiUndelete
|
||||
* @covers \ApiUndelete
|
||||
*/
|
||||
class ApiUndeleteTest extends ApiTestCase {
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ class ApiUndeleteTest extends ApiTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ApiUndelete::execute()
|
||||
* @covers \ApiUndelete::execute()
|
||||
*/
|
||||
public function testUndeleteWithWatch(): void {
|
||||
$title = Title::makeTitle( NS_MAIN, 'TestUndeleteWithWatch' );
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use MediaWiki\WikiMap\WikiMap;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiUpload
|
||||
* @covers \ApiUpload
|
||||
*/
|
||||
class ApiUploadTest extends ApiUploadTestCase {
|
||||
private ?Authority $uploader = null;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @covers ApiUsageException
|
||||
* @covers \ApiUsageException
|
||||
*/
|
||||
class ApiUsageExceptionTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use MediaWiki\User\User;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiUserrights
|
||||
* @covers \ApiUserrights
|
||||
*/
|
||||
class ApiUserrightsTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use Wikimedia\Timestamp\ConvertibleTimestamp;
|
|||
* @group API
|
||||
* @group Database
|
||||
* @group medium
|
||||
* @covers ApiWatch
|
||||
* @covers \ApiWatch
|
||||
*/
|
||||
class ApiWatchTest extends ApiTestCase {
|
||||
protected function setUp(): void {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use Wikimedia\TestingAccessWrapper;
|
|||
/**
|
||||
* @group API
|
||||
* @group Database
|
||||
* @covers ApiFormatBase
|
||||
* @covers \ApiFormatBase
|
||||
*/
|
||||
class ApiFormatBaseTest extends ApiFormatTestBase {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/**
|
||||
* @group API
|
||||
* @covers ApiFormatJson
|
||||
* @covers \ApiFormatJson
|
||||
*/
|
||||
class ApiFormatJsonTest extends ApiFormatTestBase {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/**
|
||||
* @group API
|
||||
* @covers ApiFormatNone
|
||||
* @covers \ApiFormatNone
|
||||
*/
|
||||
class ApiFormatNoneTest extends ApiFormatTestBase {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/**
|
||||
* @group API
|
||||
* @covers ApiFormatPhp
|
||||
* @covers \ApiFormatPhp
|
||||
*/
|
||||
class ApiFormatPhpTest extends ApiFormatTestBase {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/**
|
||||
* @group API
|
||||
* @covers ApiFormatRaw
|
||||
* @covers \ApiFormatRaw
|
||||
*/
|
||||
class ApiFormatRawTest extends ApiFormatTestBase {
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use MediaWiki\Title\Title;
|
|||
/**
|
||||
* @group API
|
||||
* @group Database
|
||||
* @covers ApiFormatXml
|
||||
* @covers \ApiFormatXml
|
||||
*/
|
||||
class ApiFormatXmlTest extends ApiFormatTestBase {
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use MediaWiki\Title\Title;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiQueryAllPages
|
||||
* @covers \ApiQueryAllPages
|
||||
*/
|
||||
class ApiQueryAllPagesTest extends ApiTestCase {
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use MediaWiki\Title\Title;
|
|||
* @group API
|
||||
* @group Database
|
||||
* @group medium
|
||||
* @covers ApiQueryAllRevisions
|
||||
* @covers \ApiQueryAllRevisions
|
||||
*/
|
||||
class ApiQueryAllRevisionsTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use MediaWiki\Tests\Unit\Permissions\MockAuthorityTrait;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiQueryAllUsers
|
||||
* @covers \ApiQueryAllUsers
|
||||
*/
|
||||
class ApiQueryAllUsersTest extends ApiTestCase {
|
||||
use MockAuthorityTrait;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ use MediaWiki\Title\Title;
|
|||
* @group API
|
||||
* @group Database
|
||||
* @group medium
|
||||
* @covers ApiQuery
|
||||
* @covers \ApiQuery
|
||||
*/
|
||||
class ApiQueryBasicTest extends ApiQueryTestBase {
|
||||
protected $exceptionFromAddDBData;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use Wikimedia\TestingAccessWrapper;
|
|||
use Wikimedia\Timestamp\ConvertibleTimestamp;
|
||||
|
||||
/**
|
||||
* @covers ApiQueryBlockInfoTrait
|
||||
* @covers \ApiQueryBlockInfoTrait
|
||||
*/
|
||||
class ApiQueryBlockInfoTraitTest extends MediaWikiIntegrationTestCase {
|
||||
use MockAuthorityTrait;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use MediaWiki\MainConfigNames;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiQueryBlocks
|
||||
* @covers \ApiQueryBlocks
|
||||
*/
|
||||
class ApiQueryBlocksTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
* @group API
|
||||
* @group Database
|
||||
* @group medium
|
||||
* @covers ApiQuery
|
||||
* @covers \ApiQuery
|
||||
*/
|
||||
class ApiQueryContinue2Test extends ApiQueryContinueTestBase {
|
||||
protected $exceptionFromAddDBData;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
* @group API
|
||||
* @group Database
|
||||
* @group medium
|
||||
* @covers ApiQuery
|
||||
* @covers \ApiQuery
|
||||
*/
|
||||
class ApiQueryContinueTest extends ApiQueryContinueTestBase {
|
||||
protected $exceptionFromAddDBData;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @group API
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiQueryDisabled
|
||||
* @covers \ApiQueryDisabled
|
||||
*/
|
||||
class ApiQueryDisabledTest extends ApiTestCase {
|
||||
public function testDisabled() {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use MediaWiki\User\UserIdentityValue;
|
|||
use MediaWiki\Utils\MWTimestamp;
|
||||
|
||||
/**
|
||||
* @covers ApiQueryImageInfo
|
||||
* @covers \ApiQueryImageInfo
|
||||
* @group API
|
||||
* @group medium
|
||||
* @group Database
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use Wikimedia\Timestamp\ConvertibleTimestamp;
|
|||
* @group medium
|
||||
* @group Database
|
||||
*
|
||||
* @covers ApiQueryInfo
|
||||
* @covers \ApiQueryInfo
|
||||
*/
|
||||
class ApiQueryInfoTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use Wikimedia\Timestamp\ConvertibleTimestamp;
|
|||
* @group API
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiQueryLanguageinfo
|
||||
* @covers \ApiQueryLanguageinfo
|
||||
*/
|
||||
class ApiQueryLanguageinfoTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use MediaWiki\Tests\User\TempUser\TempUserTestTrait;
|
|||
use MediaWiki\User\UserIdentityValue;
|
||||
|
||||
/**
|
||||
* @covers ApiQueryLogEvents
|
||||
* @covers \ApiQueryLogEvents
|
||||
* @group API
|
||||
* @group Database
|
||||
* @group medium
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use MediaWiki\MainConfigNames;
|
|||
* @group medium
|
||||
* @group Database
|
||||
*
|
||||
* @covers ApiQueryPrefixSearch
|
||||
* @covers \ApiQueryPrefixSearch
|
||||
*/
|
||||
class ApiQueryPrefixSearchTest extends ApiTestCase {
|
||||
private const TEST_QUERY = 'unittest';
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use MediaWiki\User\UserIdentityValue;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiQueryRecentChanges
|
||||
* @covers \ApiQueryRecentChanges
|
||||
*/
|
||||
class ApiQueryRecentChangesIntegrationTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use MediaWiki\User\UserIdentityValue;
|
|||
* @group API
|
||||
* @group Database
|
||||
* @group medium
|
||||
* @covers ApiQueryRevisions
|
||||
* @covers \ApiQueryRevisions
|
||||
*/
|
||||
class ApiQueryRevisionsTest extends ApiTestCase {
|
||||
use TempUserTestTrait;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use MediaWiki\Title\Title;
|
|||
|
||||
/**
|
||||
* @group medium
|
||||
* @covers ApiQuerySearch
|
||||
* @covers \ApiQuerySearch
|
||||
*/
|
||||
class ApiQuerySearchTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use Wikimedia\TestingAccessWrapper;
|
|||
* @group medium
|
||||
* @group Database
|
||||
*
|
||||
* @covers ApiQuerySiteinfo
|
||||
* @covers \ApiQuerySiteinfo
|
||||
*/
|
||||
class ApiQuerySiteinfoTest extends ApiTestCase {
|
||||
private $originalRegistryLoaded = null;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use MediaWiki\Title\Title;
|
|||
* @group API
|
||||
* @group Database
|
||||
* @group medium
|
||||
* @covers ApiQuery
|
||||
* @covers \ApiQuery
|
||||
*/
|
||||
class ApiQueryTest extends ApiTestCase {
|
||||
use DummyServicesTrait;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use MediaWiki\MainConfigNames;
|
|||
/**
|
||||
* @group API
|
||||
* @group medium
|
||||
* @covers ApiQueryTokens
|
||||
* @covers \ApiQueryTokens
|
||||
*/
|
||||
class ApiQueryTokensTest extends ApiTestCase {
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use MediaWiki\User\UserRigorOptions;
|
|||
* @group API
|
||||
* @group Database
|
||||
* @group medium
|
||||
* @covers ApiQueryUserContribs
|
||||
* @covers \ApiQueryUserContribs
|
||||
*/
|
||||
class ApiQueryUserContribsTest extends ApiTestCase {
|
||||
public function addDBDataOnce() {
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ use MediaWiki\Utils\MWTimestamp;
|
|||
* @group API
|
||||
* @group Database
|
||||
* @group medium
|
||||
* @covers ApiQueryUserInfo
|
||||
* @covers \ApiQueryUserInfo
|
||||
*/
|
||||
class ApiQueryUserInfoTest extends ApiTestCase {
|
||||
|
||||
/**
|
||||
* @covers ApiQueryUserInfo::getLatestContributionTime
|
||||
* @covers \ApiQueryUserInfo::getLatestContributionTime
|
||||
*/
|
||||
public function testTimestamp() {
|
||||
$clock = MWTimestamp::convert( TS_UNIX, '20100101000000' );
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use MediaWiki\User\User;
|
|||
* @group API
|
||||
* @group Database
|
||||
*
|
||||
* @covers ApiQueryWatchlist
|
||||
* @covers \ApiQueryWatchlist
|
||||
*/
|
||||
class ApiQueryWatchlistIntegrationTest extends ApiTestCase {
|
||||
// TODO: This test should use Authority, but can't due to User::saveSettings
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use MediaWiki\User\User;
|
|||
* @group Database
|
||||
* @group medium
|
||||
*
|
||||
* @covers ApiQueryWatchlistRaw
|
||||
* @covers \ApiQueryWatchlistRaw
|
||||
*/
|
||||
class ApiQueryWatchlistRawIntegrationTest extends ApiTestCase {
|
||||
// TODO: This test should use Authority, but can't due to User::saveSettings
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use MediaWiki\Title\Title;
|
|||
/**
|
||||
* @group Database
|
||||
* @group Cache
|
||||
* @covers BacklinkCache
|
||||
* @covers \BacklinkCache
|
||||
*/
|
||||
class BacklinkCacheTest extends MediaWikiIntegrationTestCase {
|
||||
private static $backlinkCacheTest;
|
||||
|
|
@ -40,7 +40,7 @@ class BacklinkCacheTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider provideCasesForHasLink
|
||||
* @covers BacklinkCache::hasLinks
|
||||
* @covers \BacklinkCache::hasLinks
|
||||
*/
|
||||
public function testHasLink( bool $expected, string $title, string $table, string $msg = '' ) {
|
||||
$blcFactory = $this->getServiceContainer()->getBacklinkCacheFactory();
|
||||
|
|
@ -59,7 +59,7 @@ class BacklinkCacheTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider provideCasesForGetNumLinks
|
||||
* @covers BacklinkCache::getNumLinks
|
||||
* @covers \BacklinkCache::getNumLinks
|
||||
*/
|
||||
public function testGetNumLinks( int $numLinks, string $title, string $table, $max = INF ) {
|
||||
$blcFactory = $this->getServiceContainer()->getBacklinkCacheFactory();
|
||||
|
|
@ -102,7 +102,7 @@ class BacklinkCacheTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider provideCasesForGetLinks
|
||||
* @covers BacklinkCache::getLinkPages
|
||||
* @covers \BacklinkCache::getLinkPages
|
||||
*/
|
||||
public function testGetLinkPages(
|
||||
array $expectedTitles, string $title, string $table, $startId = false, $endId = false, $max = INF
|
||||
|
|
@ -120,7 +120,7 @@ class BacklinkCacheTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers BacklinkCache::partition
|
||||
* @covers \BacklinkCache::partition
|
||||
*/
|
||||
public function testPartition() {
|
||||
$targetId = $this->getServiceContainer()->getLinkTargetLookup()->acquireLinkTargetId(
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class GenderCacheTest extends MediaWikiLangTestCase {
|
|||
* test usernames
|
||||
*
|
||||
* @dataProvider provideUserGenders
|
||||
* @covers GenderCache::getGenderOf
|
||||
* @covers \GenderCache::getGenderOf
|
||||
*/
|
||||
public function testUserName( $userKey, $expectedGender ) {
|
||||
$genderCache = $this->getServiceContainer()->getGenderCache();
|
||||
|
|
@ -51,7 +51,7 @@ class GenderCacheTest extends MediaWikiLangTestCase {
|
|||
* genderCache should work with user objects, too
|
||||
*
|
||||
* @dataProvider provideUserGenders
|
||||
* @covers GenderCache::getGenderOf
|
||||
* @covers \GenderCache::getGenderOf
|
||||
*/
|
||||
public function testUserObjects( $userKey, $expectedGender ) {
|
||||
$username = self::$nameMap[$userKey] ?? $userKey;
|
||||
|
|
@ -77,7 +77,7 @@ class GenderCacheTest extends MediaWikiLangTestCase {
|
|||
* against the never existing username
|
||||
*
|
||||
* @dataProvider provideUserGenders
|
||||
* @covers GenderCache::getGenderOf
|
||||
* @covers \GenderCache::getGenderOf
|
||||
*/
|
||||
public function testStripSubpages( $userKey, $expectedGender ) {
|
||||
$username = self::$nameMap[$userKey] ?? $userKey;
|
||||
|
|
|
|||
22
tests/phpunit/includes/cache/LinkBatchTest.php
vendored
22
tests/phpunit/includes/cache/LinkBatchTest.php
vendored
|
|
@ -14,14 +14,14 @@ use Wikimedia\Rdbms\IConnectionProvider;
|
|||
/**
|
||||
* @group Database
|
||||
* @group Cache
|
||||
* @covers LinkBatch
|
||||
* @covers \LinkBatch
|
||||
*/
|
||||
class LinkBatchTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
/**
|
||||
* @covers LinkBatch::__construct()
|
||||
* @covers LinkBatch::getSize()
|
||||
* @covers LinkBatch::isEmpty()
|
||||
* @covers \LinkBatch::__construct()
|
||||
* @covers \LinkBatch::getSize()
|
||||
* @covers \LinkBatch::isEmpty()
|
||||
*/
|
||||
public function testConstructEmptyWithServices() {
|
||||
$batch = new LinkBatch(
|
||||
|
|
@ -40,9 +40,9 @@ class LinkBatchTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers LinkBatch::__construct()
|
||||
* @covers LinkBatch::getSize()
|
||||
* @covers LinkBatch::isEmpty()
|
||||
* @covers \LinkBatch::__construct()
|
||||
* @covers \LinkBatch::getSize()
|
||||
* @covers \LinkBatch::isEmpty()
|
||||
*/
|
||||
public function testConstructWithServices() {
|
||||
$batch = new LinkBatch(
|
||||
|
|
@ -83,8 +83,8 @@ class LinkBatchTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers LinkBatch::addObj()
|
||||
* @covers LinkBatch::getSize()
|
||||
* @covers \LinkBatch::addObj()
|
||||
* @covers \LinkBatch::getSize()
|
||||
*/
|
||||
public function testAddObj() {
|
||||
$batch = $this->newLinkBatch(
|
||||
|
|
@ -102,8 +102,8 @@ class LinkBatchTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers LinkBatch::add()
|
||||
* @covers LinkBatch::getSize()
|
||||
* @covers \LinkBatch::add()
|
||||
* @covers \LinkBatch::getSize()
|
||||
*/
|
||||
public function testAdd() {
|
||||
$batch = $this->newLinkBatch(
|
||||
|
|
|
|||
54
tests/phpunit/includes/cache/LinkCacheTest.php
vendored
54
tests/phpunit/includes/cache/LinkCacheTest.php
vendored
|
|
@ -8,7 +8,7 @@ use MediaWiki\Title\TitleValue;
|
|||
/**
|
||||
* @group Database
|
||||
* @group Cache
|
||||
* @covers LinkCache
|
||||
* @covers \LinkCache
|
||||
*/
|
||||
class LinkCacheTest extends MediaWikiIntegrationTestCase {
|
||||
use LinkCacheTestTrait;
|
||||
|
|
@ -58,11 +58,11 @@ class LinkCacheTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider providePageAndLinkAndArray
|
||||
* @covers LinkCache::addGoodLinkObjFromRow()
|
||||
* @covers LinkCache::getGoodLinkRow()
|
||||
* @covers LinkCache::getGoodLinkID()
|
||||
* @covers LinkCache::getGoodLinkFieldObj()
|
||||
* @covers LinkCache::clearLink()
|
||||
* @covers \LinkCache::addGoodLinkObjFromRow()
|
||||
* @covers \LinkCache::getGoodLinkRow()
|
||||
* @covers \LinkCache::getGoodLinkID()
|
||||
* @covers \LinkCache::getGoodLinkFieldObj()
|
||||
* @covers \LinkCache::clearLink()
|
||||
*/
|
||||
public function testAddGoodLinkObjFromRow( $page ) {
|
||||
$linkCache = $this->newLinkCache();
|
||||
|
|
@ -124,10 +124,10 @@ class LinkCacheTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers LinkCache::addGoodLinkObjFromRow()
|
||||
* @covers LinkCache::getGoodLinkRow()
|
||||
* @covers LinkCache::getGoodLinkID()
|
||||
* @covers LinkCache::getGoodLinkFieldObj()
|
||||
* @covers \LinkCache::addGoodLinkObjFromRow()
|
||||
* @covers \LinkCache::getGoodLinkRow()
|
||||
* @covers \LinkCache::getGoodLinkID()
|
||||
* @covers \LinkCache::getGoodLinkFieldObj()
|
||||
*/
|
||||
public function testAddGoodLinkObjWithAllParameters() {
|
||||
$linkCache = $this->getServiceContainer()->getLinkCache();
|
||||
|
|
@ -163,10 +163,10 @@ class LinkCacheTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers LinkCache::addGoodLinkObjFromRow()
|
||||
* @covers LinkCache::getGoodLinkRow()
|
||||
* @covers LinkCache::getGoodLinkID()
|
||||
* @covers LinkCache::getGoodLinkFieldObj()
|
||||
* @covers \LinkCache::addGoodLinkObjFromRow()
|
||||
* @covers \LinkCache::getGoodLinkRow()
|
||||
* @covers \LinkCache::getGoodLinkID()
|
||||
* @covers \LinkCache::getGoodLinkFieldObj()
|
||||
*/
|
||||
public function testAddGoodLinkObjFromRowWithMinimalParameters() {
|
||||
$linkCache = $this->getServiceContainer()->getLinkCache();
|
||||
|
|
@ -215,7 +215,7 @@ class LinkCacheTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers LinkCache::addGoodLinkObjFromRow()
|
||||
* @covers \LinkCache::addGoodLinkObjFromRow()
|
||||
*/
|
||||
public function testAddGoodLinkObjFromRowWithInterwikiLink() {
|
||||
$linkCache = $this->getServiceContainer()->getLinkCache();
|
||||
|
|
@ -229,9 +229,9 @@ class LinkCacheTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider providePageAndLink
|
||||
* @covers LinkCache::addBadLinkObj()
|
||||
* @covers LinkCache::isBadLink()
|
||||
* @covers LinkCache::clearLink()
|
||||
* @covers \LinkCache::addBadLinkObj()
|
||||
* @covers \LinkCache::isBadLink()
|
||||
* @covers \LinkCache::clearLink()
|
||||
*/
|
||||
public function testAddBadLinkObj( $key ) {
|
||||
$linkCache = $this->getServiceContainer()->getLinkCache();
|
||||
|
|
@ -248,7 +248,7 @@ class LinkCacheTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers LinkCache::addBadLinkObj()
|
||||
* @covers \LinkCache::addBadLinkObj()
|
||||
*/
|
||||
public function testAddBadLinkObjWithInterwikiLink() {
|
||||
$linkCache = $this->newLinkCache();
|
||||
|
|
@ -260,8 +260,8 @@ class LinkCacheTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers LinkCache::addLinkObj()
|
||||
* @covers LinkCache::getGoodLinkFieldObj
|
||||
* @covers \LinkCache::addLinkObj()
|
||||
* @covers \LinkCache::getGoodLinkFieldObj
|
||||
*/
|
||||
public function testAddLinkObj() {
|
||||
$existing = $this->getExistingTestPage();
|
||||
|
|
@ -283,7 +283,7 @@ class LinkCacheTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers LinkCache::addLinkObj()
|
||||
* @covers \LinkCache::addLinkObj()
|
||||
*/
|
||||
public function testAddLinkObjUsesCachedInfo() {
|
||||
$existing = $this->getExistingTestPage();
|
||||
|
|
@ -308,7 +308,7 @@ class LinkCacheTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers LinkCache::addLinkObj()
|
||||
* @covers \LinkCache::addLinkObj()
|
||||
*/
|
||||
public function testAddLinkObjUsesWANCache() {
|
||||
// For some namespaces we cache data (Template, File, etc)
|
||||
|
|
@ -375,7 +375,7 @@ class LinkCacheTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider provideInvalidPageParams
|
||||
* @covers LinkCache::getGoodLinkRow()
|
||||
* @covers \LinkCache::getGoodLinkRow()
|
||||
*/
|
||||
public function testGetGoodLinkRowWithBadParams( $ns, $dbkey ) {
|
||||
$linkCache = $this->newLinkCache();
|
||||
|
|
@ -391,8 +391,8 @@ class LinkCacheTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers LinkCache::getGoodLinkRow()
|
||||
* @covers LinkCache::getGoodLinkFieldObj
|
||||
* @covers \LinkCache::getGoodLinkRow()
|
||||
* @covers \LinkCache::getGoodLinkFieldObj
|
||||
*/
|
||||
public function testGetGoodLinkRow() {
|
||||
$existing = new TitleValue( NS_MAIN, 'Existing' );
|
||||
|
|
@ -415,7 +415,7 @@ class LinkCacheTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers LinkCache::getGoodLinkRow()
|
||||
* @covers \LinkCache::getGoodLinkRow()
|
||||
*/
|
||||
public function testGetGoodLinkRowUsesCachedInfo() {
|
||||
$existing = new TitleValue( NS_MAIN, 'Existing' );
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use MediaWiki\User\User;
|
|||
use MediaWiki\User\UserIdentity;
|
||||
|
||||
/**
|
||||
* @covers CategoryMembershipChange
|
||||
* @covers \CategoryMembershipChange
|
||||
*
|
||||
* @group Database
|
||||
*
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use MediaWiki\User\User;
|
|||
use MediaWiki\Utils\MWTimestamp;
|
||||
|
||||
/**
|
||||
* @covers EnhancedChangesList
|
||||
* @covers \EnhancedChangesList
|
||||
*
|
||||
* @group Database
|
||||
*
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use MediaWiki\MainConfigNames;
|
|||
use MediaWiki\Title\Title;
|
||||
|
||||
/**
|
||||
* @covers OldChangesList
|
||||
* @covers \OldChangesList
|
||||
*
|
||||
* @todo add tests to cover article link, timestamp, character difference,
|
||||
* log entry, user tool links, direction marks, tags, rollback,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use MediaWiki\MainConfigNames;
|
|||
use MediaWiki\Title\Title;
|
||||
|
||||
/**
|
||||
* @covers RCCacheEntryFactory
|
||||
* @covers \RCCacheEntryFactory
|
||||
*
|
||||
* @group Database
|
||||
*
|
||||
|
|
|
|||
|
|
@ -118,10 +118,10 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers RecentChange::save
|
||||
* @covers RecentChange::newFromId
|
||||
* @covers RecentChange::getTitle
|
||||
* @covers RecentChange::getPerformerIdentity
|
||||
* @covers \RecentChange::save
|
||||
* @covers \RecentChange::newFromId
|
||||
* @covers \RecentChange::getTitle
|
||||
* @covers \RecentChange::getPerformerIdentity
|
||||
* @dataProvider provideAttribs
|
||||
*/
|
||||
public function testDatabaseRoundTrip( $attribs ) {
|
||||
|
|
@ -151,10 +151,10 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers RecentChange::newFromRow
|
||||
* @covers RecentChange::loadFromRow
|
||||
* @covers RecentChange::getAttributes
|
||||
* @covers RecentChange::getPerformerIdentity
|
||||
* @covers \RecentChange::newFromRow
|
||||
* @covers \RecentChange::loadFromRow
|
||||
* @covers \RecentChange::getAttributes
|
||||
* @covers \RecentChange::getPerformerIdentity
|
||||
*/
|
||||
public function testNewFromRow() {
|
||||
$user = $this->getTestUser()->getUser();
|
||||
|
|
@ -208,10 +208,10 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers RecentChange::notifyNew
|
||||
* @covers RecentChange::newFromId
|
||||
* @covers RecentChange::getAttributes
|
||||
* @covers RecentChange::getPerformerIdentity
|
||||
* @covers \RecentChange::notifyNew
|
||||
* @covers \RecentChange::newFromId
|
||||
* @covers \RecentChange::getAttributes
|
||||
* @covers \RecentChange::getPerformerIdentity
|
||||
*/
|
||||
public function testNotifyNew() {
|
||||
$now = MWTimestamp::now();
|
||||
|
|
@ -246,10 +246,10 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers RecentChange::notifyNew
|
||||
* @covers RecentChange::newFromId
|
||||
* @covers RecentChange::getAttributes
|
||||
* @covers RecentChange::getPerformerIdentity
|
||||
* @covers \RecentChange::notifyNew
|
||||
* @covers \RecentChange::newFromId
|
||||
* @covers \RecentChange::getAttributes
|
||||
* @covers \RecentChange::getPerformerIdentity
|
||||
*/
|
||||
public function testNotifyEdit() {
|
||||
$now = MWTimestamp::now();
|
||||
|
|
@ -286,10 +286,10 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers RecentChange::notifyNew
|
||||
* @covers RecentChange::newFromId
|
||||
* @covers RecentChange::getAttributes
|
||||
* @covers RecentChange::getPerformerIdentity
|
||||
* @covers \RecentChange::notifyNew
|
||||
* @covers \RecentChange::newFromId
|
||||
* @covers \RecentChange::getAttributes
|
||||
* @covers \RecentChange::getPerformerIdentity
|
||||
*/
|
||||
public function testNewLogEntry() {
|
||||
$now = MWTimestamp::now();
|
||||
|
|
@ -353,7 +353,7 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers RecentChange::parseParams
|
||||
* @covers \RecentChange::parseParams
|
||||
* @dataProvider provideParseParams
|
||||
* @param array $expectedParseParams
|
||||
* @param string|null $rawRcParams
|
||||
|
|
@ -368,7 +368,7 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers RecentChange::getNotifyUrl
|
||||
* @covers \RecentChange::getNotifyUrl
|
||||
*/
|
||||
public function testGetNotifyUrlForEdit() {
|
||||
$rc = new RecentChange;
|
||||
|
|
@ -396,7 +396,7 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers RecentChange::getNotifyUrl
|
||||
* @covers \RecentChange::getNotifyUrl
|
||||
*/
|
||||
public function testGetNotifyUrlForCreate() {
|
||||
$rc = new RecentChange;
|
||||
|
|
@ -424,7 +424,7 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers RecentChange::getNotifyUrl
|
||||
* @covers \RecentChange::getNotifyUrl
|
||||
*/
|
||||
public function testGetNotifyUrlForLog() {
|
||||
$rc = new RecentChange;
|
||||
|
|
@ -458,7 +458,7 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers RecentChange::isInRCLifespan
|
||||
* @covers \RecentChange::isInRCLifespan
|
||||
* @dataProvider provideIsInRCLifespan
|
||||
*/
|
||||
public function testIsInRCLifespan( $maxAge, $offset, $tolerance, $expected ) {
|
||||
|
|
@ -482,7 +482,7 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider provideRCTypes
|
||||
* @covers RecentChange::parseFromRCType
|
||||
* @covers \RecentChange::parseFromRCType
|
||||
*/
|
||||
public function testParseFromRCType( $rcType, $type ) {
|
||||
$this->assertEquals( $type, RecentChange::parseFromRCType( $rcType ) );
|
||||
|
|
@ -490,7 +490,7 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider provideRCTypes
|
||||
* @covers RecentChange::parseToRCType
|
||||
* @covers \RecentChange::parseToRCType
|
||||
*/
|
||||
public function testParseToRCType( $rcType, $type ) {
|
||||
$this->assertEquals( $rcType, RecentChange::parseToRCType( $type ) );
|
||||
|
|
@ -505,7 +505,7 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider provideCategoryContent
|
||||
* @covers RecentChange::newForCategorization
|
||||
* @covers \RecentChange::newForCategorization
|
||||
*/
|
||||
public function testHiddenCategoryChange( $isHidden ) {
|
||||
$categoryTitle = Title::makeTitle( NS_CATEGORY, 'CategoryPage' );
|
||||
|
|
@ -547,7 +547,7 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers RecentChange::doMarkPatrolled
|
||||
* @covers \RecentChange::doMarkPatrolled
|
||||
*/
|
||||
public function testDoMarkPatrolledPermissions() {
|
||||
$rc = $this->getDummyEditRecentChange();
|
||||
|
|
@ -570,7 +570,7 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers RecentChange::doMarkPatrolled
|
||||
* @covers \RecentChange::doMarkPatrolled
|
||||
*/
|
||||
public function testDoMarkPatrolledPermissions_Hook() {
|
||||
$rc = $this->getDummyEditRecentChange();
|
||||
|
|
@ -582,7 +582,7 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers RecentChange::doMarkPatrolled
|
||||
* @covers \RecentChange::doMarkPatrolled
|
||||
*/
|
||||
public function testDoMarkPatrolledPermissions_Self() {
|
||||
$rc = $this->getDummyEditRecentChange();
|
||||
|
|
@ -593,7 +593,7 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers RecentChange::doMarkPatrolled
|
||||
* @covers \RecentChange::doMarkPatrolled
|
||||
*/
|
||||
public function testDoMarkPatrolledPermissions_NoRcPatrol() {
|
||||
$rc = $this->getDummyEditRecentChange();
|
||||
|
|
@ -602,7 +602,7 @@ class RecentChangeTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers RecentChange::doMarkPatrolled
|
||||
* @covers \RecentChange::doMarkPatrolled
|
||||
*/
|
||||
public function testDoMarkPatrolled() {
|
||||
$this->overrideConfigValue( MainConfigNames::UseRCPatrol, true );
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use MediaWiki\MainConfigNames;
|
|||
use Wikimedia\Rdbms\Platform\ISQLPlatform;
|
||||
|
||||
/**
|
||||
* @covers ChangeTags
|
||||
* @covers \ChangeTags
|
||||
* @group Database
|
||||
*/
|
||||
class ChangeTagsTest extends MediaWikiIntegrationTestCase {
|
||||
|
|
@ -460,7 +460,7 @@ class ChangeTagsTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
/**
|
||||
* @dataProvider dataGetSoftwareTags
|
||||
* @covers ChangeTags::getSoftwareTags
|
||||
* @covers \ChangeTags::getSoftwareTags
|
||||
*/
|
||||
public function testGetSoftwareTags( $softwareTags, $expected ) {
|
||||
$this->overrideConfigValue( MainConfigNames::SoftwareTags, $softwareTags );
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
/**
|
||||
* Class CollationTest
|
||||
* @covers Collation
|
||||
* @covers IcuCollation
|
||||
* @covers IdentityCollation
|
||||
* @covers UppercaseCollation
|
||||
* @covers \Collation
|
||||
* @covers \IcuCollation
|
||||
* @covers \IdentityCollation
|
||||
* @covers \UppercaseCollation
|
||||
*/
|
||||
class CollationTest extends MediaWikiLangTestCase {
|
||||
|
||||
|
|
@ -20,10 +20,10 @@ class CollationTest extends MediaWikiLangTestCase {
|
|||
* @param string $base
|
||||
* @param string $extended String containing base as a prefix.
|
||||
*
|
||||
* @covers Collation::getSortKey()
|
||||
* @covers IcuCollation::getSortKey()
|
||||
* @covers IdentityCollation::getSortKey()
|
||||
* @covers UppercaseCollation::getSortKey()
|
||||
* @covers \Collation::getSortKey()
|
||||
* @covers \IcuCollation::getSortKey()
|
||||
* @covers \IdentityCollation::getSortKey()
|
||||
* @covers \UppercaseCollation::getSortKey()
|
||||
* @dataProvider prefixDataProvider
|
||||
*/
|
||||
public function testIsPrefix( $lang, $base, $extended ) {
|
||||
|
|
@ -55,10 +55,10 @@ class CollationTest extends MediaWikiLangTestCase {
|
|||
/**
|
||||
* Opposite of testIsPrefix
|
||||
*
|
||||
* @covers Collation::getSortKey()
|
||||
* @covers IcuCollation::getSortKey()
|
||||
* @covers IdentityCollation::getSortKey()
|
||||
* @covers UppercaseCollation::getSortKey()
|
||||
* @covers \Collation::getSortKey()
|
||||
* @covers \IcuCollation::getSortKey()
|
||||
* @covers \IdentityCollation::getSortKey()
|
||||
* @covers \UppercaseCollation::getSortKey()
|
||||
* @dataProvider notPrefixDataProvider
|
||||
*/
|
||||
public function testNotIsPrefix( $lang, $base, $extended ) {
|
||||
|
|
@ -85,10 +85,10 @@ class CollationTest extends MediaWikiLangTestCase {
|
|||
* @param string $string String to get first letter of
|
||||
* @param string $firstLetter Expected first letter.
|
||||
*
|
||||
* @covers Collation::getFirstLetter()
|
||||
* @covers IcuCollation::getFirstLetter()
|
||||
* @covers IdentityCollation::getFirstLetter()
|
||||
* @covers UppercaseCollation::getFirstLetter()
|
||||
* @covers \Collation::getFirstLetter()
|
||||
* @covers \IcuCollation::getFirstLetter()
|
||||
* @covers \IdentityCollation::getFirstLetter()
|
||||
* @covers \UppercaseCollation::getFirstLetter()
|
||||
* @dataProvider firstLetterProvider
|
||||
*/
|
||||
public function testGetFirstLetter( $collation, $string, $firstLetter ) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* TODO convert to a Unit test
|
||||
*
|
||||
* @covers CustomUppercaseCollation
|
||||
* @covers \CustomUppercaseCollation
|
||||
*/
|
||||
class CustomUppercaseCollationTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue