<?php
+use MediaWiki\MediaWikiServices;
/**
* @author Addshore
parent::setUp();
self::$users['WatchedItemIntegrationTestUser']
= new TestUser( 'WatchedItemIntegrationTestUser' );
+
+ $this->hideDeprecated( 'WatchedItem::fromUserTitle' );
+ $this->hideDeprecated( 'WatchedItem::addWatch' );
+ $this->hideDeprecated( 'WatchedItem::removeWatch' );
+ $this->hideDeprecated( 'WatchedItem::isWatched' );
+ $this->hideDeprecated( 'WatchedItem::duplicateEntries' );
+ $this->hideDeprecated( 'WatchedItem::batchAddWatch' );
}
private function getUser() {
}
public function testWatchAndUnWatchItem() {
+
$user = $this->getUser();
$title = Title::newFromText( 'WatchedItemIntegrationTestPage' );
// Cleanup after previous tests
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,