HomePhabricator

Convert WatchedItem and friends to UserIdentity

Description

Convert WatchedItem and friends to UserIdentity

I wasn't able to port some places that rely on isAllowed, getOption, or
related methods.

This adds isRegistered() to UserIdentity, which works like
User::isLoggedIn() but with a better name.

I also cleaned up User mocks in WatchedItemQueryServiceUnitTest in the
course of debugging test failures when switching them to
UserIdentityValue instead of mock Users where possible. They now specify
explicitly which methods are allowed to be called on their User objects,
which I believe is good practice for mocks (and unfortunately PHPUnit
makes it awkward).

Bug: T207972
Depends-On: I883d506197a011fe4c102b72df4d9deb58ab5ca2
Change-Id: Iadbf7bc31a496899dbef44e49065ff89f37aea89

Details

Provenance
SimetricalAuthored on Apr 28 2019, 11:07 AM
Parents
rMW795bbed0ec53: Merge "Add UserOptionsUpdateJob class"
Branches
Unknown
Tags
Unknown
ChangeId
Iadbf7bc31a496899dbef44e49065ff89f37aea89