MediaWiki  1.28.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_filterPatrolledAndUserWithNoPatrolRights ($filtersOption)
 filterPatrolledOptionProvider More...
 
 testGetWatchedItemsWithRecentChangeInfo_invalidOptions (array $options, $expectedInExceptionMessage)
 getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider More...
 
 testGetWatchedItemsWithRecentChangeInfo_mysqlIndexOptimization ($dbType, array $options, array $expectedExtraConds)
 mysqlIndexOptimizationProvider More...
 
 testGetWatchedItemsWithRecentChangeInfo_optionsAndEmptyResult (array $options, array $expectedExtraFields, array $expectedExtraConds, array $expectedDbOptions)
 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

WatchedItemQueryServiceUnitTest::filterPatrolledOptionProvider ( )
WatchedItemQueryServiceUnitTest::getFakeRow ( array  $rowValues)
private
WatchedItemQueryServiceUnitTest::getMockAnonUser ( )
private
WatchedItemQueryServiceUnitTest::getMockNonAnonUserWithIdAndNoPatrolRights (   $id)
private
Parameters
int$id
Returns
PHPUnit_Framework_MockObject_MockObject|User

Definition at line 124 of file WatchedItemQueryServiceUnitTest.php.

References getMockNonAnonUserWithId().

Referenced by testGetWatchedItemsWithRecentChangeInfo_filterPatrolledAndUserWithNoPatrolRights().

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

Definition at line 102 of file WatchedItemQueryServiceUnitTest.php.

References getMockNonAnonUserWithId(), and use.

Referenced by testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks().

WatchedItemQueryServiceUnitTest::getWatchedItemsForUserInvalidOptionsProvider ( )

Definition at line 1262 of file WatchedItemQueryServiceUnitTest.php.

WatchedItemQueryServiceUnitTest::getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider ( )
WatchedItemQueryServiceUnitTest::invalidWatchlistTokenProvider ( )

Definition at line 991 of file WatchedItemQueryServiceUnitTest.php.

WatchedItemQueryServiceUnitTest::mysqlIndexOptimizationProvider ( )
WatchedItemQueryServiceUnitTest::provideGetWatchedItemsForUser_fromUntilStartFromOptions ( )
WatchedItemQueryServiceUnitTest::provideGetWatchedItemsForUserOptions ( )
WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser ( )
WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser_fromUntilStartFromOptions ( array  $options,
array  $expectedConds,
array  $expectedDbOptions 
)

provideGetWatchedItemsForUser_fromUntilStartFromOptions

Definition at line 1217 of file WatchedItemQueryServiceUnitTest.php.

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

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

getWatchedItemsForUserInvalidOptionsProvider

Definition at line 1290 of file WatchedItemQueryServiceUnitTest.php.

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

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

provideGetWatchedItemsForUserOptions

Definition at line 1123 of file WatchedItemQueryServiceUnitTest.php.

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

WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser_userNotAllowedToViewWatchlist ( )
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo ( )
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_allRevisionsOptionAndEmptyResult ( )
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_filterPatrolledAndUserWithNoPatrolRights (   $filtersOption)

filterPatrolledOptionProvider

Definition at line 570 of file WatchedItemQueryServiceUnitTest.php.

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

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

getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider

Definition at line 855 of file WatchedItemQueryServiceUnitTest.php.

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

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

mysqlIndexOptimizationProvider

Definition at line 625 of file WatchedItemQueryServiceUnitTest.php.

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

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_optionsAndEmptyResult ( array  $options,
array  $expectedExtraFields,
array  $expectedExtraConds,
array  $expectedDbOptions 
)

getWatchedItemsWithRecentChangeInfoOptionsProvider

Definition at line 500 of file WatchedItemQueryServiceUnitTest.php.

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

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

userPermissionRelatedExtraChecksProvider

Definition at line 725 of file WatchedItemQueryServiceUnitTest.php.

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

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken (   $token)

invalidWatchlistTokenProvider

Definition at line 1001 of file WatchedItemQueryServiceUnitTest.php.

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

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerOptionAndEmptyResult ( )
WatchedItemQueryServiceUnitTest::userPermissionRelatedExtraChecksProvider ( )

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