MediaWiki
1.29.2
|
WatchedItemQueryService. More...
Private Member Functions | |
getFakeRow (array $rowValues) | |
getMockAnonUser () | |
getMockDb () | |
getMockLoadBalancer ( $mockDb) | |
getMockNonAnonUserWithId ( $id) | |
getMockNonAnonUserWithIdAndNoPatrolRights ( $id) | |
getMockNonAnonUserWithIdAndRestrictedPermissions ( $id, $notAllowedAction) | |
getMockUnrestrictedNonAnonUserWithId ( $id) | |
Definition at line 8 of file WatchedItemQueryServiceUnitTest.php.
WatchedItemQueryServiceUnitTest::filterPatrolledOptionProvider | ( | ) |
Definition at line 774 of file WatchedItemQueryServiceUnitTest.php.
References WatchedItemQueryService\FILTER_NOT_PATROLLED, and WatchedItemQueryService\FILTER_PATROLLED.
|
private |
Definition at line 154 of file WatchedItemQueryServiceUnitTest.php.
Referenced by testGetWatchedItemsForUser(), testGetWatchedItemsWithRecentChangeInfo(), and testGetWatchedItemsWithRecentChangeInfo_extension().
|
private |
Definition at line 146 of file WatchedItemQueryServiceUnitTest.php.
Referenced by testGetWatchedItemsForUser_userNotAllowedToViewWatchlist().
|
private |
Definition at line 13 of file WatchedItemQueryServiceUnitTest.php.
References $s, $value, any, class, and LIST_AND.
Referenced by testGetWatchedItemsForUser(), testGetWatchedItemsForUser_fromUntilStartFromOptions(), testGetWatchedItemsForUser_invalidOptionThrowsException(), testGetWatchedItemsForUser_optionsAndEmptyResult(), testGetWatchedItemsForUser_userNotAllowedToViewWatchlist(), testGetWatchedItemsWithRecentChangeInfo(), testGetWatchedItemsWithRecentChangeInfo_allRevisionsOptionAndEmptyResult(), testGetWatchedItemsWithRecentChangeInfo_extension(), testGetWatchedItemsWithRecentChangeInfo_filterPatrolledAndUserWithNoPatrolRights(), testGetWatchedItemsWithRecentChangeInfo_invalidOptions(), testGetWatchedItemsWithRecentChangeInfo_mysqlIndexOptimization(), testGetWatchedItemsWithRecentChangeInfo_optionsAndEmptyResult(), testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorAllRevisionsOptions(), testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorOptionAndEmptyResult(), testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks(), testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken(), and testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerOptionAndEmptyResult().
|
private |
$mockDb |
Definition at line 55 of file WatchedItemQueryServiceUnitTest.php.
References any, class, and DB_SLAVE.
Referenced by testGetWatchedItemsForUser(), testGetWatchedItemsForUser_fromUntilStartFromOptions(), testGetWatchedItemsForUser_invalidOptionThrowsException(), testGetWatchedItemsForUser_optionsAndEmptyResult(), testGetWatchedItemsForUser_userNotAllowedToViewWatchlist(), testGetWatchedItemsWithRecentChangeInfo(), testGetWatchedItemsWithRecentChangeInfo_allRevisionsOptionAndEmptyResult(), testGetWatchedItemsWithRecentChangeInfo_extension(), 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 70 of file WatchedItemQueryServiceUnitTest.php.
Referenced by getMockNonAnonUserWithIdAndNoPatrolRights(), getMockNonAnonUserWithIdAndRestrictedPermissions(), getMockUnrestrictedNonAnonUserWithId(), testGetWatchedItemsForUser(), testGetWatchedItemsForUser_fromUntilStartFromOptions(), testGetWatchedItemsForUser_invalidOptionThrowsException(), and testGetWatchedItemsForUser_optionsAndEmptyResult().
|
private |
int | $id |
Definition at line 126 of file WatchedItemQueryServiceUnitTest.php.
References any, and getMockNonAnonUserWithId().
Referenced by testGetWatchedItemsWithRecentChangeInfo_filterPatrolledAndUserWithNoPatrolRights().
|
private |
int | $id | |
string | $notAllowedAction |
Definition at line 104 of file WatchedItemQueryServiceUnitTest.php.
References any, getMockNonAnonUserWithId(), and use.
Referenced by testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks().
|
private |
int | $id |
Definition at line 85 of file WatchedItemQueryServiceUnitTest.php.
References any, and getMockNonAnonUserWithId().
Referenced by getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider(), testGetWatchedItemsWithRecentChangeInfo(), testGetWatchedItemsWithRecentChangeInfo_allRevisionsOptionAndEmptyResult(), testGetWatchedItemsWithRecentChangeInfo_extension(), testGetWatchedItemsWithRecentChangeInfo_invalidOptions(), testGetWatchedItemsWithRecentChangeInfo_mysqlIndexOptimization(), testGetWatchedItemsWithRecentChangeInfo_optionsAndEmptyResult(), testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorAllRevisionsOptions(), testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorOptionAndEmptyResult(), testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken(), and testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerOptionAndEmptyResult().
WatchedItemQueryServiceUnitTest::getWatchedItemsForUserInvalidOptionsProvider | ( | ) |
Definition at line 1486 of file WatchedItemQueryServiceUnitTest.php.
WatchedItemQueryServiceUnitTest::getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider | ( | ) |
Definition at line 1010 of file WatchedItemQueryServiceUnitTest.php.
References WatchedItemQueryService\DIR_OLDER, getMockUnrestrictedNonAnonUserWithId(), and RC_EDIT.
WatchedItemQueryServiceUnitTest::getWatchedItemsWithRecentChangeInfoOptionsProvider | ( | ) |
Definition at line 445 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 1215 of file WatchedItemQueryServiceUnitTest.php.
WatchedItemQueryServiceUnitTest::mysqlIndexOptimizationProvider | ( | ) |
Definition at line 811 of file WatchedItemQueryServiceUnitTest.php.
References WatchedItemQueryService\DIR_OLDER.
WatchedItemQueryServiceUnitTest::provideGetWatchedItemsForUser_fromUntilStartFromOptions | ( | ) |
Definition at line 1373 of file WatchedItemQueryServiceUnitTest.php.
References WatchedItemQueryService\SORT_ASC, and WatchedItemQueryService\SORT_DESC.
WatchedItemQueryServiceUnitTest::provideGetWatchedItemsForUserOptions | ( | ) |
Definition at line 1285 of file WatchedItemQueryServiceUnitTest.php.
References WatchedItemQueryService\FILTER_CHANGED, WatchedItemQueryService\FILTER_NOT_CHANGED, WatchedItemQueryService\SORT_ASC, and WatchedItemQueryService\SORT_DESC.
WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser | ( | ) |
Definition at line 1245 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 1441 of file WatchedItemQueryServiceUnitTest.php.
References $options, $s, $user, $value, any, getMockDb(), getMockLoadBalancer(), getMockNonAnonUserWithId(), and LIST_AND.
WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser_invalidOptionThrowsException | ( | array | $options, |
$expectedInExceptionMessage | |||
) |
getWatchedItemsForUserInvalidOptionsProvider
Definition at line 1514 of file WatchedItemQueryServiceUnitTest.php.
References class, getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser_optionsAndEmptyResult | ( | array | $options, |
array | $expectedConds, | ||
array | $expectedDbOptions | ||
) |
provideGetWatchedItemsForUserOptions
Definition at line 1347 of file WatchedItemQueryServiceUnitTest.php.
References $options, $user, getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser_userNotAllowedToViewWatchlist | ( | ) |
Definition at line 1524 of file WatchedItemQueryServiceUnitTest.php.
References anything, getMockAnonUser(), getMockDb(), and getMockLoadBalancer().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo | ( | ) |
Definition at line 162 of file WatchedItemQueryServiceUnitTest.php.
References $user, as, class, getFakeRow(), getMockDb(), getMockLoadBalancer(), getMockUnrestrictedNonAnonUserWithId(), list, and RC_NEW.
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_allRevisionsOptionAndEmptyResult | ( | ) |
Definition at line 968 of file WatchedItemQueryServiceUnitTest.php.
References $user, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_extension | ( | ) |
Definition at line 283 of file WatchedItemQueryServiceUnitTest.php.
References $options, $res, $tables, $user, anything, as, class, getFakeRow(), getMockDb(), getMockLoadBalancer(), getMockUnrestrictedNonAnonUserWithId(), list, and RC_NEW.
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_filterPatrolledAndUserWithNoPatrolRights | ( | $filtersOption | ) |
filterPatrolledOptionProvider
Definition at line 784 of file WatchedItemQueryServiceUnitTest.php.
References $user, getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithIdAndNoPatrolRights().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_invalidOptions | ( | array | $options, |
$startFrom, | |||
$expectedInExceptionMessage | |||
) |
getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider
Definition at line 1078 of file WatchedItemQueryServiceUnitTest.php.
References $options, $user, anything, class, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_mysqlIndexOptimization | ( | $dbType, | |
array | $options, | ||
array | $expectedExtraConds | ||
) |
mysqlIndexOptimizationProvider
Definition at line 839 of file WatchedItemQueryServiceUnitTest.php.
References $options, $user, any, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_optionsAndEmptyResult | ( | array | $options, |
$startFrom, | |||
array | $expectedExtraFields, | ||
array | $expectedExtraConds, | ||
array | $expectedDbOptions | ||
) |
getWatchedItemsWithRecentChangeInfoOptionsProvider
Definition at line 712 of file WatchedItemQueryServiceUnitTest.php.
References $options, $user, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorAllRevisionsOptions | ( | ) |
Definition at line 1140 of file WatchedItemQueryServiceUnitTest.php.
References $user, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorOptionAndEmptyResult | ( | ) |
Definition at line 1094 of file WatchedItemQueryServiceUnitTest.php.
References $user, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks | ( | array | $options, |
$notAllowedAction, | |||
array | $expectedExtraConds | ||
) |
userPermissionRelatedExtraChecksProvider
Definition at line 939 of file WatchedItemQueryServiceUnitTest.php.
References $options, $user, getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithIdAndRestrictedPermissions().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken | ( | $token | ) |
invalidWatchlistTokenProvider
Definition at line 1225 of file WatchedItemQueryServiceUnitTest.php.
References $user, anything, class, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerOptionAndEmptyResult | ( | ) |
Definition at line 1182 of file WatchedItemQueryServiceUnitTest.php.
References $user, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::userPermissionRelatedExtraChecksProvider | ( | ) |
Definition at line 871 of file WatchedItemQueryServiceUnitTest.php.
References LogPage\DELETED_ACTION, LogPage\DELETED_RESTRICTED, Revision\DELETED_RESTRICTED, Revision\DELETED_USER, and RC_LOG.