Currently, when testing the service wiring, we mock dependent services by mocking the get() method in each test, either using $this->once() and willReturn() if it’s only one service, or a willReturnCallback() with a switch ( $id ) if there are multiple services. This gets relatively unwieldy, and we’d like to find a more convenient solution.
- WikibaseRepo https://gerrit.wikimedia.org/r/667229
- WikibaseClient https://gerrit.wikimedia.org/r/c/667839
- other cleanup https://gerrit.wikimedia.org/r/c/667841