Merge "Remove unused MockWebRequest from tests"
This commit is contained in:
commit
ff88aec2fb
3 changed files with 4 additions and 28 deletions
|
|
@ -400,8 +400,10 @@ because of Phabricator reports.
|
|||
cloning all database tables before running tests as MediaWikiIntegrationTest
|
||||
does. If an extension was misusing the hook to *exclude* tables from the
|
||||
clone, that will no longer occur and tests may fail.
|
||||
* The UserWrapper class, which was only loaded for tests and had no uses found
|
||||
in public MediaWiki-related git, was removed.
|
||||
* The following classes, which were only loaded for tests and had no uses found
|
||||
in public MediaWiki-related git, were removed:
|
||||
- MockWebRequest
|
||||
- UserWrapper
|
||||
* Passing Title as a second parameter to RevisionStore::getPreviousRevision and
|
||||
getNextRevision, hard deprecated since 1.31, was prohibited.
|
||||
* The internal class FirejailCommand was removed.
|
||||
|
|
|
|||
|
|
@ -212,7 +212,6 @@ $wgAutoloadClasses += [
|
|||
'MockChangesListFilter' => "$testDir/phpunit/mocks/MockChangesListFilter.php",
|
||||
'MockChangesListFilterGroup' => "$testDir/phpunit/mocks/MockChangesListFilterGroup.php",
|
||||
'MockTitleTrait' => "$testDir/phpunit/mocks/MockTitleTrait.php",
|
||||
'MockWebRequest' => "$testDir/phpunit/mocks/MockWebRequest.php",
|
||||
'NullHttpRequestFactory' => "$testDir/phpunit/mocks/NullHttpRequestFactory.php",
|
||||
'NullMultiHttpClient' => "$testDir/phpunit/mocks/NullMultiHttpClient.php",
|
||||
'MediaWiki\\Session\\DummySessionBackend'
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* A mock WebRequest.
|
||||
*
|
||||
* If the code under test accesses the response via the request (see
|
||||
* WebRequest#response), then you might be able to use this mock to simplify
|
||||
* your tests.
|
||||
*/
|
||||
class MockWebRequest extends WebRequest {
|
||||
/**
|
||||
* @var WebResponse
|
||||
*/
|
||||
protected $response;
|
||||
|
||||
public function __construct( WebResponse $response ) {
|
||||
parent::__construct();
|
||||
|
||||
$this->response = $response;
|
||||
}
|
||||
|
||||
public function response() {
|
||||
return $this->response;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue