mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 16:34:21 +00:00
8e4f08182e
Change-Id: Ia25c5bea1834a3fdd26f32a9d5ed097789329824
65 lines
1.5 KiB
PHP
65 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools\Tests;
|
|
|
|
use MediaWiki\Extension\DiscussionTools\CommentParser;
|
|
use MediaWiki\Extension\DiscussionTools\Notifications\EventDispatcher;
|
|
use MediaWiki\Page\PageIdentity;
|
|
use MediaWiki\Revision\RevisionRecord;
|
|
use MediaWiki\User\UserIdentity;
|
|
use Title;
|
|
|
|
class MockEventDispatcher extends EventDispatcher {
|
|
|
|
/**
|
|
* Public for testing
|
|
*
|
|
* Note that we can't use TestingAccessWrapper instead of this, because it doesn't support passing
|
|
* arguments by reference (causes exceptions like "PHPUnit\Framework\Error\Warning: Parameter 1 to
|
|
* ... expected to be a reference, value given").
|
|
*
|
|
* @param array &$events
|
|
* @param CommentParser $oldParser
|
|
* @param CommentParser $newParser
|
|
* @param RevisionRecord $newRevRecord
|
|
* @param PageIdentity $title
|
|
* @param UserIdentity $user
|
|
*/
|
|
public static function generateEventsFromParsers(
|
|
array &$events,
|
|
CommentParser $oldParser,
|
|
CommentParser $newParser,
|
|
RevisionRecord $newRevRecord,
|
|
PageIdentity $title,
|
|
UserIdentity $user
|
|
): void {
|
|
parent::generateEventsFromParsers(
|
|
$events,
|
|
$oldParser,
|
|
$newParser,
|
|
$newRevRecord,
|
|
$title,
|
|
$user
|
|
);
|
|
}
|
|
|
|
/**
|
|
* No-op for testing
|
|
*
|
|
* @param RevisionRecord $newRevRecord
|
|
*/
|
|
public static function addCommentChangeTag( RevisionRecord $newRevRecord ): void {
|
|
}
|
|
|
|
/**
|
|
* No-op for testing
|
|
*
|
|
* @param UserIdentity $user
|
|
* @param Title $title
|
|
* @param string $itemName
|
|
*/
|
|
protected static function addAutoSubscription( UserIdentity $user, Title $title, string $itemName ): void {
|
|
}
|
|
|
|
}
|