12 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
13 $innerService->expects( $this->never() )->method(
'addWatch' );
16 $this->setExpectedException( DBReadOnlyError::class );
22 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
23 $innerService->expects( $this->never() )->method(
'addWatchBatchForUser' );
26 $this->setExpectedException( DBReadOnlyError::class );
27 $noWriteService->addWatchBatchForUser( $this->
getTestSysop()->getUser(), [] );
32 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
33 $innerService->expects( $this->never() )->method(
'removeWatch' );
36 $this->setExpectedException( DBReadOnlyError::class );
42 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
43 $innerService->expects( $this->never() )->method(
'setNotificationTimestampsForUser' );
46 $this->setExpectedException( DBReadOnlyError::class );
47 $noWriteService->setNotificationTimestampsForUser(
56 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
57 $innerService->expects( $this->never() )->method(
'updateNotificationTimestamp' );
60 $this->setExpectedException( DBReadOnlyError::class );
61 $noWriteService->updateNotificationTimestamp(
70 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
71 $innerService->expects( $this->never() )->method(
'resetNotificationTimestamp' );
74 $this->setExpectedException( DBReadOnlyError::class );
75 $noWriteService->resetNotificationTimestamp(
77 Title::newFromText(
'Foo' )
83 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
84 $innerService->expects( $this->once() )->method(
'countWatchedItems' )->willReturn( __METHOD__ );
87 $return = $noWriteService->countWatchedItems(
90 $this->assertEquals( __METHOD__, $return );
95 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
96 $innerService->expects( $this->once() )->method(
'countWatchers' )->willReturn( __METHOD__ );
99 $return = $noWriteService->countWatchers(
102 $this->assertEquals( __METHOD__, $return );
107 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
108 $innerService->expects( $this->once() )
109 ->method(
'countVisitingWatchers' )
110 ->willReturn( __METHOD__ );
113 $return = $noWriteService->countVisitingWatchers(
117 $this->assertEquals( __METHOD__, $return );
122 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
123 $innerService->expects( $this->once() )
124 ->method(
'countVisitingWatchersMultiple' )
125 ->willReturn( __METHOD__ );
128 $return = $noWriteService->countWatchersMultiple(
132 $this->assertEquals( __METHOD__, $return );
137 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
138 $innerService->expects( $this->once() )
139 ->method(
'countVisitingWatchersMultiple' )
140 ->willReturn( __METHOD__ );
143 $return = $noWriteService->countVisitingWatchersMultiple(
147 $this->assertEquals( __METHOD__, $return );
152 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
153 $innerService->expects( $this->once() )->method(
'getWatchedItem' )->willReturn( __METHOD__ );
156 $return = $noWriteService->getWatchedItem(
160 $this->assertEquals( __METHOD__, $return );
165 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
166 $innerService->expects( $this->once() )->method(
'loadWatchedItem' )->willReturn( __METHOD__ );
169 $return = $noWriteService->loadWatchedItem(
173 $this->assertEquals( __METHOD__, $return );
178 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
179 $innerService->expects( $this->once() )
180 ->method(
'getWatchedItemsForUser' )
181 ->willReturn( __METHOD__ );
184 $return = $noWriteService->getWatchedItemsForUser(
188 $this->assertEquals( __METHOD__, $return );
193 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
194 $innerService->expects( $this->once() )->method(
'isWatched' )->willReturn( __METHOD__ );
197 $return = $noWriteService->isWatched(
201 $this->assertEquals( __METHOD__, $return );
206 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
207 $innerService->expects( $this->once() )
208 ->method(
'getNotificationTimestampsBatch' )
209 ->willReturn( __METHOD__ );
212 $return = $noWriteService->getNotificationTimestampsBatch(
216 $this->assertEquals( __METHOD__, $return );
221 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
222 $innerService->expects( $this->once() )
223 ->method(
'countUnreadNotifications' )
224 ->willReturn( __METHOD__ );
227 $return = $noWriteService->countUnreadNotifications(
231 $this->assertEquals( __METHOD__, $return );
236 $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
239 $this->setExpectedException( DBReadOnlyError::class );
240 $noWriteService->duplicateAllAssociatedEntries(
testGetWatchedItemsForUser()
testAddWatchBatchForUser()
testCountUnreadNotifications()
testCountVisitingWatchers()
testUpdateNotificationTimestamp()
testDuplicateAllAssociatedEntries()
testGetNotificationTimestampsBatch()
testSetNotificationTimestampsForUser()
testCountWatchersMultiple()
testResetNotificationTimestamp()
testCountVisitingWatchersMultiple()
Represents a page (or page fragment) title within MediaWiki.