ThumbnailEntryPointTest: Set named user in context
Why: - The default uploader is the context user, which defaults to an anonymous user, and that will fail with temp accounts enabled What: - Set a default context user as a named test user account Bug: T365669 Change-Id: I75eb63e359cd4db01a89ab6c952cc221b54c6dba
This commit is contained in:
parent
e71c2ced1f
commit
76f5010f0a
1 changed files with 3 additions and 0 deletions
|
|
@ -33,6 +33,9 @@ class ThumbnailEntryPointTest extends MediaWikiIntegrationTestCase {
|
|||
* will be called only once per test class
|
||||
*/
|
||||
public function addDBDataOnce() {
|
||||
// Set a named user account for the request context as the default,
|
||||
// so that these tests do not fail with temp accounts enabled
|
||||
RequestContext::getMain()->setUser( $this->getTestUser()->getUser() );
|
||||
// Create mock repo with test files
|
||||
$this->initTestRepoGroup();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue