aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/logging
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes/logging')
-rw-r--r--tests/phpunit/includes/logging/BlockLogFormatterTest.php2
-rw-r--r--tests/phpunit/includes/logging/ContentModelLogFormatterTest.php2
-rw-r--r--tests/phpunit/includes/logging/DatabaseLogEntryTest.php9
-rw-r--r--tests/phpunit/includes/logging/DeleteLogFormatterTest.php2
-rw-r--r--tests/phpunit/includes/logging/ImportLogFormatterTest.php2
-rw-r--r--tests/phpunit/includes/logging/LogFormatterTest.php64
-rw-r--r--tests/phpunit/includes/logging/LogFormatterTestCase.php2
-rw-r--r--tests/phpunit/includes/logging/MergeLogFormatterTest.php2
-rw-r--r--tests/phpunit/includes/logging/MoveLogFormatterTest.php2
-rw-r--r--tests/phpunit/includes/logging/NewUsersLogFormatterTest.php4
-rw-r--r--tests/phpunit/includes/logging/PageLangLogFormatterTest.php3
-rw-r--r--tests/phpunit/includes/logging/PatrolLogFormatterTest.php2
-rw-r--r--tests/phpunit/includes/logging/ProtectLogFormatterTest.php4
-rw-r--r--tests/phpunit/includes/logging/RightsLogFormatterTest.php2
-rw-r--r--tests/phpunit/includes/logging/UploadLogFormatterTest.php2
15 files changed, 56 insertions, 48 deletions
diff --git a/tests/phpunit/includes/logging/BlockLogFormatterTest.php b/tests/phpunit/includes/logging/BlockLogFormatterTest.php
index 889204d98668..b3276cf7a263 100644
--- a/tests/phpunit/includes/logging/BlockLogFormatterTest.php
+++ b/tests/phpunit/includes/logging/BlockLogFormatterTest.php
@@ -3,7 +3,7 @@
use MediaWiki\Title\TitleValue;
/**
- * @covers \BlockLogFormatter
+ * @covers \MediaWiki\Logging\BlockLogFormatter
*/
class BlockLogFormatterTest extends LogFormatterTestCase {
diff --git a/tests/phpunit/includes/logging/ContentModelLogFormatterTest.php b/tests/phpunit/includes/logging/ContentModelLogFormatterTest.php
index bb30f9ee337e..06cd7754fc35 100644
--- a/tests/phpunit/includes/logging/ContentModelLogFormatterTest.php
+++ b/tests/phpunit/includes/logging/ContentModelLogFormatterTest.php
@@ -1,7 +1,7 @@
<?php
/**
- * @covers \ContentModelLogFormatter
+ * @covers \MediaWiki\Logging\ContentModelLogFormatter
*/
class ContentModelLogFormatterTest extends LogFormatterTestCase {
public static function provideContentModelLogDatabaseRows() {
diff --git a/tests/phpunit/includes/logging/DatabaseLogEntryTest.php b/tests/phpunit/includes/logging/DatabaseLogEntryTest.php
index 307de195b54e..35a8fae988cc 100644
--- a/tests/phpunit/includes/logging/DatabaseLogEntryTest.php
+++ b/tests/phpunit/includes/logging/DatabaseLogEntryTest.php
@@ -1,5 +1,6 @@
<?php
+use MediaWiki\Logging\DatabaseLogEntry;
use MediaWiki\User\ActorStore;
use MediaWiki\User\UserIdentity;
use MediaWiki\User\UserIdentityValue;
@@ -11,8 +12,8 @@ use Wikimedia\Rdbms\IReadableDatabase;
class DatabaseLogEntryTest extends MediaWikiIntegrationTestCase {
/**
- * @covers \DatabaseLogEntry::newFromId
- * @covers \DatabaseLogEntry::getSelectQueryData
+ * @covers \MediaWiki\Logging\DatabaseLogEntry::newFromId
+ * @covers \MediaWiki\Logging\DatabaseLogEntry::getSelectQueryData
*
* @dataProvider provideNewFromId
*
@@ -33,7 +34,7 @@ class DatabaseLogEntryTest extends MediaWikiIntegrationTestCase {
->with( $selectFields['tables'],
$selectFields['fields'],
$selectFields['conds'],
- 'DatabaseLogEntry::newFromId',
+ DatabaseLogEntry::class . '::newFromId',
$selectFields['options'],
$selectFields['join_conds']
)
@@ -140,7 +141,7 @@ class DatabaseLogEntryTest extends MediaWikiIntegrationTestCase {
/**
* @dataProvider provideGetPerformerIdentity
- * @covers \DatabaseLogEntry::getPerformerIdentity
+ * @covers \MediaWiki\Logging\DatabaseLogEntry::getPerformerIdentity
*/
public function testGetPerformer( array $actorRowFields, UserIdentity $expected ) {
$logEntry = DatabaseLogEntry::newFromRow( [
diff --git a/tests/phpunit/includes/logging/DeleteLogFormatterTest.php b/tests/phpunit/includes/logging/DeleteLogFormatterTest.php
index 81bdf1379db3..d54dfd927c64 100644
--- a/tests/phpunit/includes/logging/DeleteLogFormatterTest.php
+++ b/tests/phpunit/includes/logging/DeleteLogFormatterTest.php
@@ -1,7 +1,7 @@
<?php
/**
- * @covers \DeleteLogFormatter
+ * @covers \MediaWiki\Logging\DeleteLogFormatter
*/
class DeleteLogFormatterTest extends LogFormatterTestCase {
diff --git a/tests/phpunit/includes/logging/ImportLogFormatterTest.php b/tests/phpunit/includes/logging/ImportLogFormatterTest.php
index cf3612d7c27a..b1c3e4d9c603 100644
--- a/tests/phpunit/includes/logging/ImportLogFormatterTest.php
+++ b/tests/phpunit/includes/logging/ImportLogFormatterTest.php
@@ -3,7 +3,7 @@
use MediaWiki\Tests\Unit\DummyServicesTrait;
/**
- * @covers \ImportLogFormatter
+ * @covers \MediaWiki\Logging\ImportLogFormatter
*/
class ImportLogFormatterTest extends LogFormatterTestCase {
use DummyServicesTrait;
diff --git a/tests/phpunit/includes/logging/LogFormatterTest.php b/tests/phpunit/includes/logging/LogFormatterTest.php
index 268e69f69ac0..1b7aa6274d80 100644
--- a/tests/phpunit/includes/logging/LogFormatterTest.php
+++ b/tests/phpunit/includes/logging/LogFormatterTest.php
@@ -4,6 +4,8 @@ use MediaWiki\Api\ApiResult;
use MediaWiki\Context\DerivativeContext;
use MediaWiki\Context\RequestContext;
use MediaWiki\Linker\Linker;
+use MediaWiki\Logging\LogFormatter;
+use MediaWiki\Logging\LogPage;
use MediaWiki\MainConfigNames;
use MediaWiki\Message\Message;
use MediaWiki\Permissions\SimpleAuthority;
@@ -93,7 +95,7 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::setShowUserToolLinks
+ * @covers \MediaWiki\Logging\LogFormatter::setShowUserToolLinks
*/
public function testNormalLogParams() {
$entry = $this->newLogEntry( 'test', [] );
@@ -136,7 +138,7 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getActionText
*/
public function testLogParamsTypeRaw() {
$params = [ '4:raw:raw' => Linker::link( $this->title, null, [], [] ) ];
@@ -152,7 +154,7 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getActionText
*/
public function testLogParamsTypeMsg() {
$params = [ '4:msg:msg' => 'log-description-phpunit' ];
@@ -168,7 +170,7 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getActionText
*/
public function testLogParamsTypeMsgContent() {
$params = [ '4:msg-content:msgContent' => 'log-description-phpunit' ];
@@ -184,7 +186,7 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getActionText
*/
public function testLogParamsTypeNumber() {
global $wgLang;
@@ -202,7 +204,7 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getActionText
*/
public function testLogParamsTypeUserLink() {
$params = [ '4:user-link:userLink' => $this->user->getName() ];
@@ -221,7 +223,7 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getActionText
*/
public function testLogParamsTypeUserLink_empty() {
$params = [ '4:user-link:userLink' => ':' ];
@@ -237,7 +239,7 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getActionText
*/
public function testLogParamsTypeTitleLink() {
$params = [ '4:title-link:titleLink' => $this->title->getText() ];
@@ -253,7 +255,7 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getActionText
*/
public function testLogParamsTypePlain() {
$params = [ '4:plain:plain' => 'Some plain text' ];
@@ -269,7 +271,7 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getPerformerElement
+ * @covers \MediaWiki\Logging\LogFormatter::getPerformerElement
* @dataProvider provideLogElement
*/
public function testGetPerformerElement( $deletedFlag, $allowedAction ) {
@@ -318,7 +320,7 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getComment
+ * @covers \MediaWiki\Logging\LogFormatter::getComment
* @dataProvider provideLogElement
*/
public function testLogComment( $deletedFlag, $allowedAction ) {
@@ -380,8 +382,8 @@ class LogFormatterTest extends MediaWikiLangTestCase {
/**
* @dataProvider provideApiParamFormatting
- * @covers \LogFormatter::formatParametersForApi
- * @covers \LogFormatter::formatParameterValueForApi
+ * @covers \MediaWiki\Logging\LogFormatter::formatParametersForApi
+ * @covers \MediaWiki\Logging\LogFormatter::formatParameterValueForApi
*/
public function testApiParamFormatting( $key, $value, $expected ) {
$entry = $this->newLogEntry( 'param', [ $key => $value ] );
@@ -474,8 +476,8 @@ class LogFormatterTest extends MediaWikiLangTestCase {
*/
/**
- * @covers \LogFormatter::getIRCActionComment
- * @covers \LogFormatter::getIRCActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionComment
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionText
*/
public function testIrcMsgForLogTypeBlock() {
$sep = $this->context->msg( 'colon-separator' )->text();
@@ -525,8 +527,8 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getIRCActionComment
- * @covers \LogFormatter::getIRCActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionComment
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionText
*/
public function testIrcMsgForLogTypeDelete() {
$sep = $this->context->msg( 'colon-separator' )->text();
@@ -549,8 +551,8 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getIRCActionComment
- * @covers \LogFormatter::getIRCActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionComment
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionText
*/
public function testIrcMsgForLogTypeNewusers() {
$this->assertIRCComment(
@@ -576,8 +578,8 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getIRCActionComment
- * @covers \LogFormatter::getIRCActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionComment
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionText
*/
public function testIrcMsgForLogTypeMove() {
$move_params = [
@@ -606,8 +608,8 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getIRCActionComment
- * @covers \LogFormatter::getIRCActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionComment
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionText
*/
public function testIrcMsgForLogTypePatrol() {
# patrol/patrol
@@ -623,8 +625,8 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getIRCActionComment
- * @covers \LogFormatter::getIRCActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionComment
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionText
*/
public function testIrcMsgForLogTypeProtect() {
$protectParams = [
@@ -673,8 +675,8 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getIRCActionComment
- * @covers \LogFormatter::getIRCActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionComment
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionText
*/
public function testIrcMsgForLogTypeUpload() {
$sep = $this->context->msg( 'colon-separator' )->text();
@@ -697,8 +699,8 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getIRCActionComment
- * @covers \LogFormatter::getIRCActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionComment
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionText
*/
public function testIrcMsgForLogTypeMerge() {
$sep = $this->context->msg( 'colon-separator' )->text();
@@ -717,8 +719,8 @@ class LogFormatterTest extends MediaWikiLangTestCase {
}
/**
- * @covers \LogFormatter::getIRCActionComment
- * @covers \LogFormatter::getIRCActionText
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionComment
+ * @covers \MediaWiki\Logging\LogFormatter::getIRCActionText
*/
public function testIrcMsgForLogTypeImport() {
$sep = $this->context->msg( 'colon-separator' )->text();
diff --git a/tests/phpunit/includes/logging/LogFormatterTestCase.php b/tests/phpunit/includes/logging/LogFormatterTestCase.php
index 83a16a02ebbf..d09c662e314e 100644
--- a/tests/phpunit/includes/logging/LogFormatterTestCase.php
+++ b/tests/phpunit/includes/logging/LogFormatterTestCase.php
@@ -6,6 +6,8 @@ use MediaWiki\Config\ServiceOptions;
use MediaWiki\Context\RequestContext;
use MediaWiki\Linker\LinkRenderer;
use MediaWiki\Linker\LinkTarget;
+use MediaWiki\Logging\LogEntryBase;
+use MediaWiki\Logging\LogPage;
use MediaWiki\Page\ExistingPageRecord;
use MediaWiki\Page\PageStore;
use MediaWiki\Tests\Unit\Permissions\MockAuthorityTrait;
diff --git a/tests/phpunit/includes/logging/MergeLogFormatterTest.php b/tests/phpunit/includes/logging/MergeLogFormatterTest.php
index 694efb7268ef..855aa0325cad 100644
--- a/tests/phpunit/includes/logging/MergeLogFormatterTest.php
+++ b/tests/phpunit/includes/logging/MergeLogFormatterTest.php
@@ -1,7 +1,7 @@
<?php
/**
- * @covers \MergeLogFormatter
+ * @covers \MediaWiki\Logging\MergeLogFormatter
*/
class MergeLogFormatterTest extends LogFormatterTestCase {
diff --git a/tests/phpunit/includes/logging/MoveLogFormatterTest.php b/tests/phpunit/includes/logging/MoveLogFormatterTest.php
index 719d0aa68825..913b3f3579c1 100644
--- a/tests/phpunit/includes/logging/MoveLogFormatterTest.php
+++ b/tests/phpunit/includes/logging/MoveLogFormatterTest.php
@@ -1,7 +1,7 @@
<?php
/**
- * @covers \MoveLogFormatter
+ * @covers \MediaWiki\Logging\MoveLogFormatter
*/
class MoveLogFormatterTest extends LogFormatterTestCase {
diff --git a/tests/phpunit/includes/logging/NewUsersLogFormatterTest.php b/tests/phpunit/includes/logging/NewUsersLogFormatterTest.php
index 60bd6f9244c2..5245b0517b67 100644
--- a/tests/phpunit/includes/logging/NewUsersLogFormatterTest.php
+++ b/tests/phpunit/includes/logging/NewUsersLogFormatterTest.php
@@ -1,7 +1,9 @@
<?php
+use MediaWiki\Logging\NewUsersLogFormatter;
+
/**
- * @covers \NewUsersLogFormatter
+ * @covers \MediaWiki\Logging\NewUsersLogFormatter
* @group Database
*/
class NewUsersLogFormatterTest extends LogFormatterTestCase {
diff --git a/tests/phpunit/includes/logging/PageLangLogFormatterTest.php b/tests/phpunit/includes/logging/PageLangLogFormatterTest.php
index 79d99457db34..100e74f8870a 100644
--- a/tests/phpunit/includes/logging/PageLangLogFormatterTest.php
+++ b/tests/phpunit/includes/logging/PageLangLogFormatterTest.php
@@ -1,10 +1,11 @@
<?php
+use MediaWiki\Logging\PageLangLogFormatter;
use MediaWiki\MainConfigNames;
use MediaWiki\MainConfigSchema;
/**
- * @covers \PageLangLogFormatter
+ * @covers \MediaWiki\Logging\PageLangLogFormatter
*/
class PageLangLogFormatterTest extends LogFormatterTestCase {
diff --git a/tests/phpunit/includes/logging/PatrolLogFormatterTest.php b/tests/phpunit/includes/logging/PatrolLogFormatterTest.php
index 5c0137b2abaa..98629bee75bf 100644
--- a/tests/phpunit/includes/logging/PatrolLogFormatterTest.php
+++ b/tests/phpunit/includes/logging/PatrolLogFormatterTest.php
@@ -1,7 +1,7 @@
<?php
/**
- * @covers \PatrolLogFormatter
+ * @covers \MediaWiki\Logging\PatrolLogFormatter
*/
class PatrolLogFormatterTest extends LogFormatterTestCase {
diff --git a/tests/phpunit/includes/logging/ProtectLogFormatterTest.php b/tests/phpunit/includes/logging/ProtectLogFormatterTest.php
index ecdb77583f7b..64bd55461af9 100644
--- a/tests/phpunit/includes/logging/ProtectLogFormatterTest.php
+++ b/tests/phpunit/includes/logging/ProtectLogFormatterTest.php
@@ -11,7 +11,7 @@ use Wikimedia\Rdbms\IDatabase;
use Wikimedia\Rdbms\LBFactory;
/**
- * @covers \ProtectLogFormatter
+ * @covers \MediaWiki\Logging\ProtectLogFormatter
*/
class ProtectLogFormatterTest extends LogFormatterTestCase {
@@ -466,7 +466,7 @@ class ProtectLogFormatterTest extends LogFormatterTestCase {
* @param string[] $permissions
* @param bool $shouldMatch
* @dataProvider provideGetActionLinks
- * @covers \ProtectLogFormatter::getActionLinks
+ * @covers \MediaWiki\Logging\ProtectLogFormatter::getActionLinks
*/
public function testGetActionLinks( array $permissions, $shouldMatch ) {
RequestContext::resetMain();
diff --git a/tests/phpunit/includes/logging/RightsLogFormatterTest.php b/tests/phpunit/includes/logging/RightsLogFormatterTest.php
index 5fe31e6dc5eb..83a007236b6a 100644
--- a/tests/phpunit/includes/logging/RightsLogFormatterTest.php
+++ b/tests/phpunit/includes/logging/RightsLogFormatterTest.php
@@ -4,7 +4,7 @@ use Wikimedia\Rdbms\IDatabase;
use Wikimedia\Rdbms\LBFactory;
/**
- * @covers \RightsLogFormatter
+ * @covers \MediaWiki\Logging\RightsLogFormatter
*/
class RightsLogFormatterTest extends LogFormatterTestCase {
diff --git a/tests/phpunit/includes/logging/UploadLogFormatterTest.php b/tests/phpunit/includes/logging/UploadLogFormatterTest.php
index b5199588af32..0e2722a90432 100644
--- a/tests/phpunit/includes/logging/UploadLogFormatterTest.php
+++ b/tests/phpunit/includes/logging/UploadLogFormatterTest.php
@@ -1,7 +1,7 @@
<?php
/**
- * @covers \UploadLogFormatter
+ * @covers \MediaWiki\Logging\UploadLogFormatter
*/
class UploadLogFormatterTest extends LogFormatterTestCase {