MediaWiki REL1_30
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
 
 testGetWatchedItemsForUser_invalidOptionThrowsException (array $options, $expectedInExceptionMessage)
 getWatchedItemsForUserInvalidOptionsProvider
 
 testGetWatchedItemsForUser_optionsAndEmptyResult (array $options, array $expectedConds, array $expectedDbOptions)
 provideGetWatchedItemsForUserOptions
 
 testGetWatchedItemsForUser_userNotAllowedToViewWatchlist ()
 
 testGetWatchedItemsWithRecentChangeInfo ()
 
 testGetWatchedItemsWithRecentChangeInfo_allRevisionsOptionAndEmptyResult ()
 
 testGetWatchedItemsWithRecentChangeInfo_extension ()
 
 testGetWatchedItemsWithRecentChangeInfo_filterPatrolledAndUserWithNoPatrolRights ( $filtersOption)
 filterPatrolledOptionProvider
 
 testGetWatchedItemsWithRecentChangeInfo_invalidOptions (array $options, $startFrom, $expectedInExceptionMessage)
 getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider
 
 testGetWatchedItemsWithRecentChangeInfo_mysqlIndexOptimization ( $dbType, array $options, array $expectedExtraConds)
 mysqlIndexOptimizationProvider
 
 testGetWatchedItemsWithRecentChangeInfo_optionsAndEmptyResult (array $options, $startFrom, array $expectedExtraTables, array $expectedExtraFields, array $expectedExtraConds, array $expectedDbOptions, array $expectedExtraJoinConds, array $globals=[])
 getWatchedItemsWithRecentChangeInfoOptionsProvider
 
 testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorAllRevisionsOptions ()
 
 testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorOptionAndEmptyResult ()
 
 testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks (array $options, $notAllowedAction, array $expectedExtraConds)
 userPermissionRelatedExtraChecksProvider
 
 testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken ( $token)
 invalidWatchlistTokenProvider
 
 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 ( )

Definition at line 914 of file WatchedItemQueryServiceUnitTest.php.

◆ 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, and getMockNonAnonUserWithId().

Referenced by testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks().

◆ getMockUnrestrictedNonAnonUserWithId()

◆ getWatchedItemsForUserInvalidOptionsProvider()

WatchedItemQueryServiceUnitTest::getWatchedItemsForUserInvalidOptionsProvider ( )

Definition at line 1626 of file WatchedItemQueryServiceUnitTest.php.

◆ getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider()

WatchedItemQueryServiceUnitTest::getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider ( )

◆ getWatchedItemsWithRecentChangeInfoOptionsProvider()

WatchedItemQueryServiceUnitTest::getWatchedItemsWithRecentChangeInfoOptionsProvider ( )

◆ invalidWatchlistTokenProvider()

WatchedItemQueryServiceUnitTest::invalidWatchlistTokenProvider ( )

Definition at line 1355 of file WatchedItemQueryServiceUnitTest.php.

◆ mysqlIndexOptimizationProvider()

WatchedItemQueryServiceUnitTest::mysqlIndexOptimizationProvider ( )

Definition at line 951 of file WatchedItemQueryServiceUnitTest.php.

◆ provideGetWatchedItemsForUser_fromUntilStartFromOptions()

WatchedItemQueryServiceUnitTest::provideGetWatchedItemsForUser_fromUntilStartFromOptions ( )

Definition at line 1513 of file WatchedItemQueryServiceUnitTest.php.

◆ provideGetWatchedItemsForUserOptions()

WatchedItemQueryServiceUnitTest::provideGetWatchedItemsForUserOptions ( )

Definition at line 1425 of file WatchedItemQueryServiceUnitTest.php.

◆ 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, $value, any, getMockDb(), getMockLoadBalancer(), getMockNonAnonUserWithId(), LIST_AND, and will.

◆ testGetWatchedItemsForUser_invalidOptionThrowsException()

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

getWatchedItemsForUserInvalidOptionsProvider

Definition at line 1654 of file WatchedItemQueryServiceUnitTest.php.

References 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, 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 getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithIdAndNoPatrolRights().

◆ testGetWatchedItemsWithRecentChangeInfo_invalidOptions()

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

getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider

Definition at line 1218 of file WatchedItemQueryServiceUnitTest.php.

References $options, anything, 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, 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, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().

◆ 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, getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithIdAndRestrictedPermissions().

◆ testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken ( $token)

invalidWatchlistTokenProvider

Definition at line 1365 of file WatchedItemQueryServiceUnitTest.php.

References anything, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().

◆ testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerOptionAndEmptyResult()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerOptionAndEmptyResult ( )

◆ userPermissionRelatedExtraChecksProvider()

WatchedItemQueryServiceUnitTest::userPermissionRelatedExtraChecksProvider ( )

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