MediaWiki  1.30.0
WatchedItemQueryServiceUnitTest Class Reference

WatchedItemQueryService. More...

Inheritance diagram for WatchedItemQueryServiceUnitTest:
Collaboration diagram for WatchedItemQueryServiceUnitTest:

Public Member Functions

 filterPatrolledOptionProvider ()
 
 getWatchedItemsForUserInvalidOptionsProvider ()
 
 getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider ()
 
 getWatchedItemsWithRecentChangeInfoOptionsProvider ()
 
 invalidWatchlistTokenProvider ()
 
 mysqlIndexOptimizationProvider ()
 
 provideGetWatchedItemsForUser_fromUntilStartFromOptions ()
 
 provideGetWatchedItemsForUserOptions ()
 
 testGetWatchedItemsForUser ()
 
 testGetWatchedItemsForUser_fromUntilStartFromOptions (array $options, array $expectedConds, array $expectedDbOptions)
 provideGetWatchedItemsForUser_fromUntilStartFromOptions More...
 
 testGetWatchedItemsForUser_invalidOptionThrowsException (array $options, $expectedInExceptionMessage)
 getWatchedItemsForUserInvalidOptionsProvider More...
 
 testGetWatchedItemsForUser_optionsAndEmptyResult (array $options, array $expectedConds, array $expectedDbOptions)
 provideGetWatchedItemsForUserOptions More...
 
 testGetWatchedItemsForUser_userNotAllowedToViewWatchlist ()
 
 testGetWatchedItemsWithRecentChangeInfo ()
 
 testGetWatchedItemsWithRecentChangeInfo_allRevisionsOptionAndEmptyResult ()
 
 testGetWatchedItemsWithRecentChangeInfo_extension ()
 
 testGetWatchedItemsWithRecentChangeInfo_filterPatrolledAndUserWithNoPatrolRights ( $filtersOption)
 filterPatrolledOptionProvider More...
 
 testGetWatchedItemsWithRecentChangeInfo_invalidOptions (array $options, $startFrom, $expectedInExceptionMessage)
 getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider More...
 
 testGetWatchedItemsWithRecentChangeInfo_mysqlIndexOptimization ( $dbType, array $options, array $expectedExtraConds)
 mysqlIndexOptimizationProvider More...
 
 testGetWatchedItemsWithRecentChangeInfo_optionsAndEmptyResult (array $options, $startFrom, array $expectedExtraTables, array $expectedExtraFields, array $expectedExtraConds, array $expectedDbOptions, array $expectedExtraJoinConds, array $globals=[])
 getWatchedItemsWithRecentChangeInfoOptionsProvider More...
 
 testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorAllRevisionsOptions ()
 
 testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorOptionAndEmptyResult ()
 
 testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks (array $options, $notAllowedAction, array $expectedExtraConds)
 userPermissionRelatedExtraChecksProvider More...
 
 testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken ( $token)
 invalidWatchlistTokenProvider More...
 
 testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerOptionAndEmptyResult ()
 
 userPermissionRelatedExtraChecksProvider ()
 

Private Member Functions

 getFakeRow (array $rowValues)
 
 getMockAnonUser ()
 
 getMockDb ()
 
 getMockLoadBalancer ( $mockDb)
 
 getMockNonAnonUserWithId ( $id)
 
 getMockNonAnonUserWithIdAndNoPatrolRights ( $id)
 
 getMockNonAnonUserWithIdAndRestrictedPermissions ( $id, $notAllowedAction)
 
 getMockUnrestrictedNonAnonUserWithId ( $id)
 

Detailed Description

Member Function Documentation

◆ filterPatrolledOptionProvider()

WatchedItemQueryServiceUnitTest::filterPatrolledOptionProvider ( )

◆ getFakeRow()

WatchedItemQueryServiceUnitTest::getFakeRow ( array  $rowValues)
private

◆ getMockAnonUser()

WatchedItemQueryServiceUnitTest::getMockAnonUser ( )
private

◆ getMockDb()

◆ getMockLoadBalancer()

◆ getMockNonAnonUserWithId()

◆ getMockNonAnonUserWithIdAndNoPatrolRights()

WatchedItemQueryServiceUnitTest::getMockNonAnonUserWithIdAndNoPatrolRights (   $id)
private
Parameters
int$id
Returns
PHPUnit_Framework_MockObject_MockObject|User

Definition at line 127 of file WatchedItemQueryServiceUnitTest.php.

References any, and getMockNonAnonUserWithId().

Referenced by testGetWatchedItemsWithRecentChangeInfo_filterPatrolledAndUserWithNoPatrolRights().

◆ getMockNonAnonUserWithIdAndRestrictedPermissions()

WatchedItemQueryServiceUnitTest::getMockNonAnonUserWithIdAndRestrictedPermissions (   $id,
  $notAllowedAction 
)
private
Parameters
int$id
string$notAllowedAction
Returns
PHPUnit_Framework_MockObject_MockObject|User

Definition at line 105 of file WatchedItemQueryServiceUnitTest.php.

References any, getMockNonAnonUserWithId(), and use.

Referenced by testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks().

◆ getMockUnrestrictedNonAnonUserWithId()

◆ getWatchedItemsForUserInvalidOptionsProvider()

WatchedItemQueryServiceUnitTest::getWatchedItemsForUserInvalidOptionsProvider ( )

Definition at line 1626 of file WatchedItemQueryServiceUnitTest.php.

◆ getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider()

WatchedItemQueryServiceUnitTest::getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider ( )

◆ getWatchedItemsWithRecentChangeInfoOptionsProvider()

◆ invalidWatchlistTokenProvider()

WatchedItemQueryServiceUnitTest::invalidWatchlistTokenProvider ( )

Definition at line 1355 of file WatchedItemQueryServiceUnitTest.php.

◆ mysqlIndexOptimizationProvider()

WatchedItemQueryServiceUnitTest::mysqlIndexOptimizationProvider ( )

◆ provideGetWatchedItemsForUser_fromUntilStartFromOptions()

WatchedItemQueryServiceUnitTest::provideGetWatchedItemsForUser_fromUntilStartFromOptions ( )

◆ provideGetWatchedItemsForUserOptions()

WatchedItemQueryServiceUnitTest::provideGetWatchedItemsForUserOptions ( )

◆ testGetWatchedItemsForUser()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser ( )

◆ testGetWatchedItemsForUser_fromUntilStartFromOptions()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser_fromUntilStartFromOptions ( array  $options,
array  $expectedConds,
array  $expectedDbOptions 
)

provideGetWatchedItemsForUser_fromUntilStartFromOptions

Definition at line 1581 of file WatchedItemQueryServiceUnitTest.php.

References $options, $s, $user, $value, any, getMockDb(), getMockLoadBalancer(), getMockNonAnonUserWithId(), and LIST_AND.

◆ testGetWatchedItemsForUser_invalidOptionThrowsException()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser_invalidOptionThrowsException ( array  $options,
  $expectedInExceptionMessage 
)

getWatchedItemsForUserInvalidOptionsProvider

Definition at line 1654 of file WatchedItemQueryServiceUnitTest.php.

References class, getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithId().

◆ testGetWatchedItemsForUser_optionsAndEmptyResult()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser_optionsAndEmptyResult ( array  $options,
array  $expectedConds,
array  $expectedDbOptions 
)

provideGetWatchedItemsForUserOptions

Definition at line 1487 of file WatchedItemQueryServiceUnitTest.php.

References $options, $user, getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithId().

◆ testGetWatchedItemsForUser_userNotAllowedToViewWatchlist()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser_userNotAllowedToViewWatchlist ( )

◆ testGetWatchedItemsWithRecentChangeInfo()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo ( )

◆ testGetWatchedItemsWithRecentChangeInfo_allRevisionsOptionAndEmptyResult()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_allRevisionsOptionAndEmptyResult ( )

◆ testGetWatchedItemsWithRecentChangeInfo_extension()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_extension ( )

◆ testGetWatchedItemsWithRecentChangeInfo_filterPatrolledAndUserWithNoPatrolRights()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_filterPatrolledAndUserWithNoPatrolRights (   $filtersOption)

filterPatrolledOptionProvider

Definition at line 924 of file WatchedItemQueryServiceUnitTest.php.

References $user, getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithIdAndNoPatrolRights().

◆ testGetWatchedItemsWithRecentChangeInfo_invalidOptions()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_invalidOptions ( array  $options,
  $startFrom,
  $expectedInExceptionMessage 
)

getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider

Definition at line 1218 of file WatchedItemQueryServiceUnitTest.php.

References $options, $user, anything, class, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().

◆ testGetWatchedItemsWithRecentChangeInfo_mysqlIndexOptimization()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_mysqlIndexOptimization (   $dbType,
array  $options,
array  $expectedExtraConds 
)

mysqlIndexOptimizationProvider

Definition at line 979 of file WatchedItemQueryServiceUnitTest.php.

References $options, $user, any, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().

◆ testGetWatchedItemsWithRecentChangeInfo_optionsAndEmptyResult()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_optionsAndEmptyResult ( array  $options,
  $startFrom,
array  $expectedExtraTables,
array  $expectedExtraFields,
array  $expectedExtraConds,
array  $expectedDbOptions,
array  $expectedExtraJoinConds,
array  $globals = [] 
)

getWatchedItemsWithRecentChangeInfoOptionsProvider

Definition at line 830 of file WatchedItemQueryServiceUnitTest.php.

References $GLOBALS, $options, $user, as, getMockDb(), getMockLoadBalancer(), getMockUnrestrictedNonAnonUserWithId(), and use.

◆ testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorAllRevisionsOptions()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorAllRevisionsOptions ( )

◆ testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorOptionAndEmptyResult()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorOptionAndEmptyResult ( )

◆ testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks ( array  $options,
  $notAllowedAction,
array  $expectedExtraConds 
)

userPermissionRelatedExtraChecksProvider

Definition at line 1079 of file WatchedItemQueryServiceUnitTest.php.

References $options, $user, getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithIdAndRestrictedPermissions().

◆ testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken (   $token)

invalidWatchlistTokenProvider

Definition at line 1365 of file WatchedItemQueryServiceUnitTest.php.

References $user, anything, class, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().

◆ testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerOptionAndEmptyResult()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerOptionAndEmptyResult ( )

◆ userPermissionRelatedExtraChecksProvider()

WatchedItemQueryServiceUnitTest::userPermissionRelatedExtraChecksProvider ( )

The documentation for this class was generated from the following file: