MediaWiki
1.30.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 9 of file WatchedItemQueryServiceUnitTest.php.
WatchedItemQueryServiceUnitTest::filterPatrolledOptionProvider | ( | ) |
Definition at line 914 of file WatchedItemQueryServiceUnitTest.php.
References WatchedItemQueryService\FILTER_NOT_PATROLLED, and WatchedItemQueryService\FILTER_PATROLLED.
|
private |
Definition at line 155 of file WatchedItemQueryServiceUnitTest.php.
Referenced by testGetWatchedItemsForUser(), testGetWatchedItemsWithRecentChangeInfo(), and testGetWatchedItemsWithRecentChangeInfo_extension().
|
private |
Definition at line 147 of file WatchedItemQueryServiceUnitTest.php.
Referenced by testGetWatchedItemsForUser_userNotAllowedToViewWatchlist().
|
private |
Definition at line 14 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 |
PHPUnit_Framework_MockObject_MockObject | Database | $mockDb |
Definition at line 56 of file WatchedItemQueryServiceUnitTest.php.
References any, class, and DB_REPLICA.
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 71 of file WatchedItemQueryServiceUnitTest.php.
Referenced by getMockNonAnonUserWithIdAndNoPatrolRights(), getMockNonAnonUserWithIdAndRestrictedPermissions(), getMockUnrestrictedNonAnonUserWithId(), testGetWatchedItemsForUser(), testGetWatchedItemsForUser_fromUntilStartFromOptions(), testGetWatchedItemsForUser_invalidOptionThrowsException(), and testGetWatchedItemsForUser_optionsAndEmptyResult().
|
private |
int | $id |
Definition at line 127 of file WatchedItemQueryServiceUnitTest.php.
References any, and getMockNonAnonUserWithId().
Referenced by testGetWatchedItemsWithRecentChangeInfo_filterPatrolledAndUserWithNoPatrolRights().
|
private |
int | $id | |
string | $notAllowedAction |
Definition at line 105 of file WatchedItemQueryServiceUnitTest.php.
References any, getMockNonAnonUserWithId(), and use.
Referenced by testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks().
|
private |
int | $id |
Definition at line 86 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 1626 of file WatchedItemQueryServiceUnitTest.php.
WatchedItemQueryServiceUnitTest::getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider | ( | ) |
Definition at line 1150 of file WatchedItemQueryServiceUnitTest.php.
References WatchedItemQueryService\DIR_OLDER, getMockUnrestrictedNonAnonUserWithId(), and RC_EDIT.
WatchedItemQueryServiceUnitTest::getWatchedItemsWithRecentChangeInfoOptionsProvider | ( | ) |
Definition at line 446 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, MIGRATION_NEW, MIGRATION_OLD, MIGRATION_WRITE_BOTH, MIGRATION_WRITE_NEW, RC_EDIT, and RC_NEW.
WatchedItemQueryServiceUnitTest::invalidWatchlistTokenProvider | ( | ) |
Definition at line 1355 of file WatchedItemQueryServiceUnitTest.php.
WatchedItemQueryServiceUnitTest::mysqlIndexOptimizationProvider | ( | ) |
Definition at line 951 of file WatchedItemQueryServiceUnitTest.php.
References WatchedItemQueryService\DIR_OLDER.
WatchedItemQueryServiceUnitTest::provideGetWatchedItemsForUser_fromUntilStartFromOptions | ( | ) |
Definition at line 1513 of file WatchedItemQueryServiceUnitTest.php.
References WatchedItemQueryService\SORT_ASC, and WatchedItemQueryService\SORT_DESC.
WatchedItemQueryServiceUnitTest::provideGetWatchedItemsForUserOptions | ( | ) |
Definition at line 1425 of file WatchedItemQueryServiceUnitTest.php.
References WatchedItemQueryService\FILTER_CHANGED, WatchedItemQueryService\FILTER_NOT_CHANGED, WatchedItemQueryService\SORT_ASC, and WatchedItemQueryService\SORT_DESC.
WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser | ( | ) |
Definition at line 1385 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 1581 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 1654 of file WatchedItemQueryServiceUnitTest.php.
References class, getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser_optionsAndEmptyResult | ( | array | $options, |
array | $expectedConds, | ||
array | $expectedDbOptions | ||
) |
provideGetWatchedItemsForUserOptions
Definition at line 1487 of file WatchedItemQueryServiceUnitTest.php.
References $options, $user, getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser_userNotAllowedToViewWatchlist | ( | ) |
Definition at line 1664 of file WatchedItemQueryServiceUnitTest.php.
References anything, getMockAnonUser(), getMockDb(), and getMockLoadBalancer().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo | ( | ) |
Definition at line 163 of file WatchedItemQueryServiceUnitTest.php.
References $user, as, class, getFakeRow(), getMockDb(), getMockLoadBalancer(), getMockUnrestrictedNonAnonUserWithId(), list, and RC_NEW.
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_allRevisionsOptionAndEmptyResult | ( | ) |
Definition at line 1108 of file WatchedItemQueryServiceUnitTest.php.
References $user, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_extension | ( | ) |
Definition at line 284 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 924 of file WatchedItemQueryServiceUnitTest.php.
References $user, getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithIdAndNoPatrolRights().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_invalidOptions | ( | array | $options, |
$startFrom, | |||
$expectedInExceptionMessage | |||
) |
getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider
Definition at line 1218 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 979 of file WatchedItemQueryServiceUnitTest.php.
References $options, $user, any, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
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, $user, as, getMockDb(), getMockLoadBalancer(), getMockUnrestrictedNonAnonUserWithId(), and use.
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorAllRevisionsOptions | ( | ) |
Definition at line 1280 of file WatchedItemQueryServiceUnitTest.php.
References $user, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorOptionAndEmptyResult | ( | ) |
Definition at line 1234 of file WatchedItemQueryServiceUnitTest.php.
References $user, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks | ( | array | $options, |
$notAllowedAction, | |||
array | $expectedExtraConds | ||
) |
userPermissionRelatedExtraChecksProvider
Definition at line 1079 of file WatchedItemQueryServiceUnitTest.php.
References $options, $user, getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithIdAndRestrictedPermissions().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken | ( | $token | ) |
invalidWatchlistTokenProvider
Definition at line 1365 of file WatchedItemQueryServiceUnitTest.php.
References $user, anything, class, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerOptionAndEmptyResult | ( | ) |
Definition at line 1322 of file WatchedItemQueryServiceUnitTest.php.
References $user, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::userPermissionRelatedExtraChecksProvider | ( | ) |
Definition at line 1011 of file WatchedItemQueryServiceUnitTest.php.
References LogPage\DELETED_ACTION, LogPage\DELETED_RESTRICTED, Revision\DELETED_RESTRICTED, Revision\DELETED_USER, and RC_LOG.