[ 0 => [ 'WatchedItemStoreIntegrationTestPage' => 0 ] ],
$store->countWatchersMultiple( [ $title ], [ 'minimumWatchers' => $initialWatchers + 2 ] )
);
+ $this->assertEquals(
+ [ $title->getNamespace() => [ $title->getDBkey() => null ] ],
+ $store->getNotificationTimestampsBatch( $user, [ $title ] )
+ );
$store->removeWatch( $user, $title );
$this->assertFalse(
$initialWatchers,
$store->countWatchersMultiple( [ $title ] )[$title->getNamespace()][$title->getDBkey()]
);
+ $this->assertEquals(
+ [ $title->getNamespace() => [ $title->getDBkey() => false ] ],
+ $store->getNotificationTimestampsBatch( $user, [ $title ] )
+ );
}
public function testUpdateAndResetNotificationTimestamp() {
'20150202010101',
$store->loadWatchedItem( $user, $title )->getNotificationTimestamp()
);
+ $this->assertEquals(
+ [ $title->getNamespace() => [ $title->getDBkey() => '20150202010101' ] ],
+ $store->getNotificationTimestampsBatch( $user, [ $title ] )
+ );
$this->assertEquals(
$initialVisitingWatchers - 1,
$store->countVisitingWatchers( $title, '20150202020202' )
);
+ $this->assertEquals(
+ $initialVisitingWatchers - 1,
+ $store->countVisitingWatchersMultiple(
+ [ [ $title, '20150202020202' ] ]
+ )[$title->getNamespace()][$title->getDBkey()]
+ );
$this->assertEquals(
$initialUnreadNotifications + 1,
$store->countUnreadNotifications( $user )
$this->assertTrue( $store->resetNotificationTimestamp( $user, $title ) );
$this->assertNull( $store->getWatchedItem( $user, $title )->getNotificationTimestamp() );
+ $this->assertEquals(
+ [ $title->getNamespace() => [ $title->getDBkey() => null ] ],
+ $store->getNotificationTimestampsBatch( $user, [ $title ] )
+ );
$this->assertEquals(
$initialVisitingWatchers,
$store->countVisitingWatchers( $title, '20150202020202' )
);
+ $this->assertEquals(
+ $initialVisitingWatchers,
+ $store->countVisitingWatchersMultiple(
+ [ [ $title, '20150202020202' ] ]
+ )[$title->getNamespace()][$title->getDBkey()]
+ );
+ $this->assertEquals(
+ [ 0 => [ 'WatchedItemStoreIntegrationTestPage' => $initialVisitingWatchers ] ],
+ $store->countVisitingWatchersMultiple(
+ [ [ $title, '20150202020202' ] ], $initialVisitingWatchers
+ )
+ );
+ $this->assertEquals(
+ [ 0 => [ 'WatchedItemStoreIntegrationTestPage' => 0 ] ],
+ $store->countVisitingWatchersMultiple(
+ [ [ $title, '20150202020202' ] ], $initialVisitingWatchers + 1
+ )
+ );
}
public function testDuplicateAllAssociatedEntries() {