mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-12-20 20:03:42 +00:00
fd0de6b09a
Bug: T321681 Change-Id: I66a498679d0743b7740887c636eca001efc170cd
65 lines
1.6 KiB
PHP
65 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools\Tests;
|
|
|
|
use MediaWiki\Extension\DiscussionTools\ContentThreadItemSet;
|
|
use MediaWiki\Extension\DiscussionTools\Notifications\EventDispatcher;
|
|
use MediaWiki\Page\PageIdentity;
|
|
use MediaWiki\Revision\RevisionRecord;
|
|
use MediaWiki\Title\Title;
|
|
use MediaWiki\User\UserIdentity;
|
|
|
|
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 ContentThreadItemSet $oldItemSet
|
|
* @param ContentThreadItemSet $newItemSet
|
|
* @param RevisionRecord $newRevRecord
|
|
* @param PageIdentity $title
|
|
* @param UserIdentity $user
|
|
*/
|
|
public static function generateEventsFromItemSets(
|
|
array &$events,
|
|
ContentThreadItemSet $oldItemSet,
|
|
ContentThreadItemSet $newItemSet,
|
|
RevisionRecord $newRevRecord,
|
|
PageIdentity $title,
|
|
UserIdentity $user
|
|
): void {
|
|
parent::generateEventsFromItemSets(
|
|
$events,
|
|
$oldItemSet,
|
|
$newItemSet,
|
|
$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 {
|
|
}
|
|
|
|
}
|