diff options
author | Umherirrender <umherirrender_de.wp@web.de> | 2021-01-05 00:53:01 +0100 |
---|---|---|
committer | Umherirrender <umherirrender_de.wp@web.de> | 2021-04-06 23:10:43 +0200 |
commit | f338645527fc9a4eb51ecfa0d355adc283f55c59 (patch) | |
tree | fa43015172854570ef203b74ccf50b2693cf31e0 /autoload.php | |
parent | 5ce92e0a5321b5525c0e4dad8412f93f3c48da5a (diff) | |
download | mediawikicore-f338645527fc9a4eb51ecfa0d355adc283f55c59.tar.gz mediawikicore-f338645527fc9a4eb51ecfa0d355adc283f55c59.zip |
Create FauxRequestUpload to fake uploads in tests
And use it in core
Avoid direct use of super global $_FILES
This can breaks all FauxRequest relaying on $_FILES
in tests or production code via FauxRequest::getUpload.
Falls back to $_FILES for the moment
Bug: T48163
Change-Id: I7392acc9bb682ec6b7025dbed0734c142f45c91a
Diffstat (limited to 'autoload.php')
-rw-r--r-- | autoload.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/autoload.php b/autoload.php index 93df91642bbb..6bff119fda75 100644 --- a/autoload.php +++ b/autoload.php @@ -491,6 +491,7 @@ $wgAutoloadLocalClasses = [ 'FallbackContentHandler' => __DIR__ . '/includes/content/FallbackContentHandler.php', 'FatalError' => __DIR__ . '/includes/exception/FatalError.php', 'FauxRequest' => __DIR__ . '/includes/FauxRequest.php', + 'FauxRequestUpload' => __DIR__ . '/includes/FauxRequestUpload.php', 'FauxResponse' => __DIR__ . '/includes/FauxResponse.php', 'FauxSearchResult' => __DIR__ . '/includes/search/FauxSearchResult.php', 'FauxSearchResultSet' => __DIR__ . '/includes/search/FauxSearchResultSet.php', |