MediaWiki REL1_30
|
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.
|
private |
Definition at line 155 of file WatchedItemQueryServiceUnitTest.php.
References $value.
Referenced by testGetWatchedItemsForUser(), testGetWatchedItemsWithRecentChangeInfo(), and testGetWatchedItemsWithRecentChangeInfo_extension().
|
private |
Definition at line 147 of file WatchedItemQueryServiceUnitTest.php.
References any.
Referenced by testGetWatchedItemsForUser_userNotAllowedToViewWatchlist().
|
private |
Definition at line 14 of file WatchedItemQueryServiceUnitTest.php.
References $s, $value, any, 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, 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.
References any.
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, and getMockNonAnonUserWithId().
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 getMockUnrestrictedNonAnonUserWithId(), and RC_EDIT.
WatchedItemQueryServiceUnitTest::getWatchedItemsWithRecentChangeInfoOptionsProvider | ( | ) |
Definition at line 446 of file WatchedItemQueryServiceUnitTest.php.
References 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.
WatchedItemQueryServiceUnitTest::provideGetWatchedItemsForUser_fromUntilStartFromOptions | ( | ) |
Definition at line 1513 of file WatchedItemQueryServiceUnitTest.php.
WatchedItemQueryServiceUnitTest::provideGetWatchedItemsForUserOptions | ( | ) |
Definition at line 1425 of file WatchedItemQueryServiceUnitTest.php.
WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser | ( | ) |
Definition at line 1385 of file WatchedItemQueryServiceUnitTest.php.
References 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, $value, any, getMockDb(), getMockLoadBalancer(), getMockNonAnonUserWithId(), LIST_AND, and will.
WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser_invalidOptionThrowsException | ( | array | $options, |
$expectedInExceptionMessage ) |
getWatchedItemsForUserInvalidOptionsProvider
Definition at line 1654 of file WatchedItemQueryServiceUnitTest.php.
References getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsForUser_optionsAndEmptyResult | ( | array | $options, |
array | $expectedConds, | ||
array | $expectedDbOptions ) |
provideGetWatchedItemsForUserOptions
Definition at line 1487 of file WatchedItemQueryServiceUnitTest.php.
References $options, 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 getFakeRow(), getMockDb(), getMockLoadBalancer(), getMockUnrestrictedNonAnonUserWithId(), list, and RC_NEW.
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_allRevisionsOptionAndEmptyResult | ( | ) |
Definition at line 1108 of file WatchedItemQueryServiceUnitTest.php.
References getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_extension | ( | ) |
Definition at line 284 of file WatchedItemQueryServiceUnitTest.php.
References $options, $res, $tables, anything, getFakeRow(), getMockDb(), getMockLoadBalancer(), getMockUnrestrictedNonAnonUserWithId(), list, and RC_NEW.
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_filterPatrolledAndUserWithNoPatrolRights | ( | $filtersOption | ) |
filterPatrolledOptionProvider
Definition at line 924 of file WatchedItemQueryServiceUnitTest.php.
References getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithIdAndNoPatrolRights().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_invalidOptions | ( | array | $options, |
$startFrom, | |||
$expectedInExceptionMessage ) |
getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider
Definition at line 1218 of file WatchedItemQueryServiceUnitTest.php.
References $options, anything, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_mysqlIndexOptimization | ( | $dbType, | |
array | $options, | ||
array | $expectedExtraConds ) |
mysqlIndexOptimizationProvider
Definition at line 979 of file WatchedItemQueryServiceUnitTest.php.
References $options, 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, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorAllRevisionsOptions | ( | ) |
Definition at line 1280 of file WatchedItemQueryServiceUnitTest.php.
References getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_usedInGeneratorOptionAndEmptyResult | ( | ) |
Definition at line 1234 of file WatchedItemQueryServiceUnitTest.php.
References getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_userPermissionRelatedExtraChecks | ( | array | $options, |
$notAllowedAction, | |||
array | $expectedExtraConds ) |
userPermissionRelatedExtraChecksProvider
Definition at line 1079 of file WatchedItemQueryServiceUnitTest.php.
References $options, getMockDb(), getMockLoadBalancer(), and getMockNonAnonUserWithIdAndRestrictedPermissions().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken | ( | $token | ) |
invalidWatchlistTokenProvider
Definition at line 1365 of file WatchedItemQueryServiceUnitTest.php.
References anything, getMockDb(), getMockLoadBalancer(), and getMockUnrestrictedNonAnonUserWithId().
WatchedItemQueryServiceUnitTest::testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerOptionAndEmptyResult | ( | ) |
Definition at line 1322 of file WatchedItemQueryServiceUnitTest.php.
References 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.