<?php
+use MediaWiki\MediaWikiServices;
/**
* @author Addshore
$this->hideDeprecated( 'WatchedItem::addWatch' );
$this->hideDeprecated( 'WatchedItem::removeWatch' );
$this->hideDeprecated( 'WatchedItem::isWatched' );
- $this->hideDeprecated( 'WatchedItem::resetNotificationTimestamp' );
$this->hideDeprecated( 'WatchedItem::duplicateEntries' );
$this->hideDeprecated( 'WatchedItem::batchAddWatch' );
}
WatchedItem::fromUserTitle( $user, $title )->getNotificationTimestamp()
);
- WatchedItem::fromUserTitle( $user, $title )->resetNotificationTimestamp();
+ MediaWikiServices::getInstance()->getWatchedItemStore()->resetNotificationTimestamp(
+ $user, $title
+ );
$this->assertNull( WatchedItem::fromUserTitle( $user, $title )->getNotificationTimestamp() );
}
$user = $this->getUser();
$title = Title::newFromText( 'WatchedItemIntegrationTestPage' );
WatchedItem::fromUserTitle( $user, $title )->addWatch();
- WatchedItem::fromUserTitle( $user, $title )->resetNotificationTimestamp();
+ MediaWikiServices::getInstance()->getWatchedItemStore()->resetNotificationTimestamp(
+ $user, $title
+ );
$this->assertEquals(
null,