MediaWiki
1.28.0
|
WatchedItemQueryService. More...
Private Member Functions | |
getFakeRow (array $rowValues) | |
getMockAnonUser () | |
getMockDb () | |
getMockLoadBalancer ($mockDb) | |
getMockNonAnonUserWithId ($id) | |
getMockNonAnonUserWithIdAndNoPatrolRights ($id) | |
getMockNonAnonUserWithIdAndRestrictedPermissions ($id, $notAllowedAction) | |
getMockUnrestrictedNonAnonUserWithId ($id) | |
Definition at line 6 of file WatchedItemQueryServiceUnitTest.php.
WatchedItemQueryServiceUnitTest::filterPatrolledOptionProvider | ( | ) |
Definition at line 560 of file WatchedItemQueryServiceUnitTest.php.
References WatchedItemQueryService\FILTER_NOT_PATROLLED, and WatchedItemQueryService\FILTER_PATROLLED.
|
private |
Definition at line 152 of file WatchedItemQueryServiceUnitTest.php.
Referenced by testGetWatchedItemsForUser(), and testGetWatchedItemsWithRecentChangeInfo().
|
private |
Definition at line 144 of file WatchedItemQueryServiceUnitTest.php.
References class.
Referenced by testGetWatchedItemsForUser_userNotAllowedToViewWatchlist().
|
private |
Definition at line 11 of file WatchedItemQueryServiceUnitTest.php.
References $s, $value, class, and LIST_AND.
Referenced by testGetWatchedItemsForUser(), testGetWatchedItemsForUser_fromUntilStartFromOptions(), testGetWatchedItemsForUser_invalidOptionThrowsException(), testGetWatchedItemsForUser_optionsAndEmptyResult(), testGetWatchedItemsForUser_userNotAllowedToViewWatchlist(), testGetWatchedItemsWithRecentChangeInfo(), testGetWatchedItemsWithRecentChangeInfo_allRevisionsOptionAndEmptyResult(), testGetWatchedItemsWithRecentChangeInfo_filterPatrolledAndUserWithNoPatrolRights(), testGetWatchedItemsWithRecentChangeInfo_invalidOptions(), testGetWatchedItemsWithRecentChangeInfo_mysqlIndexOptimization(), testGetWatchedItemsWithRecentChangeInfo_optionsAndEmptyResult(), testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorAllRevisionsOptions(), testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorOptionAndEmptyResult(), testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks(), testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken(), and testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerOptionAndEmptyResult().
|
private |
$mockDb |
Definition at line 53 of file WatchedItemQueryServiceUnitTest.php.
References class, and DB_SLAVE.
Referenced by testGetWatchedItemsForUser(), testGetWatchedItemsForUser_fromUntilStartFromOptions(), testGetWatchedItemsForUser_invalidOptionThrowsException(), testGetWatchedItemsForUser_optionsAndEmptyResult(), testGetWatchedItemsForUser_userNotAllowedToViewWatchlist(), testGetWatchedItemsWithRecentChangeInfo(), testGetWatchedItemsWithRecentChangeInfo_allRevisionsOptionAndEmptyResult(), testGetWatchedItemsWithRecentChangeInfo_filterPatrolledAndUserWithNoPatrolRights(), testGetWatchedItemsWithRecentChangeInfo_invalidOptions(), testGetWatchedItemsWithRecentChangeInfo_mysqlIndexOptimization(), testGetWatchedItemsWithRecentChangeInfo_optionsAndEmptyResult(), testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorAllRevisionsOptions(), testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorOptionAndEmptyResult(), testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks(), testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken(), and testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerOptionAndEmptyResult().
|
private |
int | $id |
Definition at line 68 of file WatchedItemQueryServiceUnitTest.php.
References class.
Referenced by getMockNonAnonUserWithIdAndNoPatrolRights(), getMockNonAnonUserWithIdAndRestrictedPermissions(), getMockUnrestrictedNonAnonUserWithId(), testGetWatchedItemsForUser(), testGetWatchedItemsForUser_fromUntilStartFromOptions(), testGetWatchedItemsForUser_invalidOptionThrowsException(), and testGetWatchedItemsForUser_optionsAndEmptyResult().
|
private |
int | $id |
Definition at line 124 of file WatchedItemQueryServiceUnitTest.php.
References getMockNonAnonUserWithId().
Referenced by testGetWatchedItemsWithRecentChangeInfo_filterPatrolledAndUserWithNoPatrolRights().
|
private |
int | $id | |
string | $notAllowedAction |
Definition at line 102 of file WatchedItemQueryServiceUnitTest.php.
References getMockNonAnonUserWithId(), and use.
Referenced by testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks().
|
private |
int | $id |
Definition at line 83 of file WatchedItemQueryServiceUnitTest.php.
References getMockNonAnonUserWithId().
Referenced by getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider(), testGetWatchedItemsWithRecentChangeInfo(), testGetWatchedItemsWithRecentChangeInfo_allRevisionsOptionAndEmptyResult(), testGetWatchedItemsWithRecentChangeInfo_invalidOptions(), testGetWatchedItemsWithRecentChangeInfo_mysqlIndexOptimization(), testGetWatchedItemsWithRecentChangeInfo_optionsAndEmptyResult(), testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorAllRevisionsOptions(), testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorOptionAndEmptyResult(), testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken(), and testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerOptionAndEmptyResult().
WatchedItemQueryServiceUnitTest::getWatchedItemsForUserInvalidOptionsProvider | ( | ) |
Definition at line 1262 of file WatchedItemQueryServiceUnitTest.php.
WatchedItemQueryServiceUnitTest::getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider | ( | ) |
Definition at line 796 of file WatchedItemQueryServiceUnitTest.php.
References WatchedItemQueryService\DIR_OLDER, getMockUnrestrictedNonAnonUserWithId(), and RC_EDIT.
WatchedItemQueryServiceUnitTest::getWatchedItemsWithRecentChangeInfoOptionsProvider | ( | ) |
Definition at line 265 of file WatchedItemQueryServiceUnitTest.php.
References WatchedItemQueryService\DIR_NEWER, WatchedItemQueryService\DIR_OLDER, WatchedItemQueryService\FILTER_ANON, WatchedItemQueryService\FILTER_BOT, WatchedItemQueryService\FILTER_MINOR, WatchedItemQueryService\FILTER_NOT_ANON, WatchedItemQueryService\FILTER_NOT_BOT, WatchedItemQueryService\FILTER_NOT_MINOR, WatchedItemQueryService\FILTER_NOT_PATROLLED, WatchedItemQueryService\FILTER_NOT_UNREAD, WatchedItemQueryService\FILTER_PATROLLED, WatchedItemQueryService\FILTER_UNREAD, WatchedItemQueryService\INCLUDE_COMMENT, WatchedItemQueryService\INCLUDE_FLAGS, WatchedItemQueryService\INCLUDE_LOG_INFO, WatchedItemQueryService\INCLUDE_PATROL_INFO, WatchedItemQueryService\INCLUDE_SIZES, WatchedItemQueryService\INCLUDE_USER, WatchedItemQueryService\INCLUDE_USER_ID, RC_EDIT, and RC_NEW.
WatchedItemQueryServiceUnitTest::invalidWatchlistTokenProvider | ( | ) |
Definition at line 991 of file WatchedItemQueryServiceUnitTest.php.
WatchedItemQueryServiceUnitTest::mysqlIndexOptimizationProvider | ( | ) |
Definition at line 597 of file WatchedItemQueryServiceUnitTest.php.
References WatchedItemQueryService\DIR_OLDER.
WatchedItemQueryServiceUnitTest::provideGetWatchedItemsForUser_fromUntilStartFromOptions | ( | ) |
Definition at line 1149 of file WatchedItemQueryServiceUnitTest.php.
References WatchedItemQueryService\SORT_ASC, and WatchedItemQueryService\SORT_DESC.
WatchedItemQueryServiceUnitTest::provideGetWatchedItemsForUserOptions | ( | ) |
Definition at line 1061 of file WatchedItemQueryServiceUnitTest.php.
References WatchedItemQueryService\FILTER_CHANGED, WatchedItemQueryService\FILTER_NOT_CHANGED, WatchedItemQueryService\SORT_ASC, and WatchedItemQueryService\SORT_DESC.
WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser | ( | ) |
Definition at line 1021 of file WatchedItemQueryServiceUnitTest.php.
References $user, class, getFakeRow(), getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithId().
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 | ( | ) |
Definition at line 1300 of file WatchedItemQueryServiceUnitTest.php.
References anything, getMockAnonUser(), getMockDb(), and getMockLoadBalancer().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo | ( | ) |
Definition at line 160 of file WatchedItemQueryServiceUnitTest.php.
References $user, as, class, getFakeRow(), getMockDb(), getMockLoadBalancer(), getMockUnrestrictedNonAnonUserWithId(), list, and RC_NEW.
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_allRevisionsOptionAndEmptyResult | ( | ) |
Definition at line 754 of file WatchedItemQueryServiceUnitTest.php.
References $user, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
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 | ( | ) |
Definition at line 916 of file WatchedItemQueryServiceUnitTest.php.
References $user, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorOptionAndEmptyResult | ( | ) |
Definition at line 870 of file WatchedItemQueryServiceUnitTest.php.
References $user, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
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 | ( | ) |
Definition at line 958 of file WatchedItemQueryServiceUnitTest.php.
References $user, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::userPermissionRelatedExtraChecksProvider | ( | ) |
Definition at line 657 of file WatchedItemQueryServiceUnitTest.php.
References LogPage\DELETED_ACTION, LogPage\DELETED_RESTRICTED, Revision\DELETED_RESTRICTED, Revision\DELETED_USER, and RC_LOG.