MediaWiki REL1_28
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_filterPatrolledAndUserWithNoPatrolRights ( $filtersOption)
 filterPatrolledOptionProvider
 
 testGetWatchedItemsWithRecentChangeInfo_invalidOptions (array $options, $expectedInExceptionMessage)
 getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider
 
 testGetWatchedItemsWithRecentChangeInfo_mysqlIndexOptimization ( $dbType, array $options, array $expectedExtraConds)
 mysqlIndexOptimizationProvider
 
 testGetWatchedItemsWithRecentChangeInfo_optionsAndEmptyResult (array $options, array $expectedExtraFields, array $expectedExtraConds, array $expectedDbOptions)
 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 560 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 124 of file WatchedItemQueryServiceUnitTest.php.

References 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 102 of file WatchedItemQueryServiceUnitTest.php.

References getMockNonAnonUserWithId(), and use.

Referenced by testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks().

◆ getMockUnrestrictedNonAnonUserWithId()

◆ getWatchedItemsForUserInvalidOptionsProvider()

WatchedItemQueryServiceUnitTest::getWatchedItemsForUserInvalidOptionsProvider ( )

Definition at line 1262 of file WatchedItemQueryServiceUnitTest.php.

◆ getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider()

WatchedItemQueryServiceUnitTest::getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider ( )

◆ getWatchedItemsWithRecentChangeInfoOptionsProvider()

WatchedItemQueryServiceUnitTest::getWatchedItemsWithRecentChangeInfoOptionsProvider ( )

Definition at line 265 of file WatchedItemQueryServiceUnitTest.php.

References RC_EDIT, and RC_NEW.

◆ invalidWatchlistTokenProvider()

WatchedItemQueryServiceUnitTest::invalidWatchlistTokenProvider ( )

Definition at line 991 of file WatchedItemQueryServiceUnitTest.php.

◆ mysqlIndexOptimizationProvider()

WatchedItemQueryServiceUnitTest::mysqlIndexOptimizationProvider ( )

Definition at line 597 of file WatchedItemQueryServiceUnitTest.php.

◆ provideGetWatchedItemsForUser_fromUntilStartFromOptions()

WatchedItemQueryServiceUnitTest::provideGetWatchedItemsForUser_fromUntilStartFromOptions ( )

Definition at line 1149 of file WatchedItemQueryServiceUnitTest.php.

◆ provideGetWatchedItemsForUserOptions()

WatchedItemQueryServiceUnitTest::provideGetWatchedItemsForUserOptions ( )

Definition at line 1061 of file WatchedItemQueryServiceUnitTest.php.

◆ testGetWatchedItemsForUser()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser ( )

◆ testGetWatchedItemsForUser_fromUntilStartFromOptions()

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

provideGetWatchedItemsForUser_fromUntilStartFromOptions

Definition at line 1217 of file WatchedItemQueryServiceUnitTest.php.

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

◆ testGetWatchedItemsForUser_invalidOptionThrowsException()

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

getWatchedItemsForUserInvalidOptionsProvider

Definition at line 1290 of file WatchedItemQueryServiceUnitTest.php.

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

◆ testGetWatchedItemsForUser_optionsAndEmptyResult()

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

provideGetWatchedItemsForUserOptions

Definition at line 1123 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_filterPatrolledAndUserWithNoPatrolRights()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_filterPatrolledAndUserWithNoPatrolRights (   $filtersOption)

filterPatrolledOptionProvider

Definition at line 570 of file WatchedItemQueryServiceUnitTest.php.

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

◆ testGetWatchedItemsWithRecentChangeInfo_invalidOptions()

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

getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider

Definition at line 855 of file WatchedItemQueryServiceUnitTest.php.

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

◆ testGetWatchedItemsWithRecentChangeInfo_mysqlIndexOptimization()

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

mysqlIndexOptimizationProvider

Definition at line 625 of file WatchedItemQueryServiceUnitTest.php.

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

◆ testGetWatchedItemsWithRecentChangeInfo_optionsAndEmptyResult()

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

getWatchedItemsWithRecentChangeInfoOptionsProvider

Definition at line 500 of file WatchedItemQueryServiceUnitTest.php.

References $options, $user, 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 725 of file WatchedItemQueryServiceUnitTest.php.

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

◆ testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken (   $token)

invalidWatchlistTokenProvider

Definition at line 1001 of file WatchedItemQueryServiceUnitTest.php.

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

◆ testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerOptionAndEmptyResult()

WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerOptionAndEmptyResult ( )

◆ userPermissionRelatedExtraChecksProvider()

WatchedItemQueryServiceUnitTest::userPermissionRelatedExtraChecksProvider ( )

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