More complete, more straightforward JobQueueMemoryTest
[mediawiki.git] / tests / phpunit / mocks / MockWebRequest.php
blob3ac5bfb067028250271a69ac4b5493f23c8c0dbc
1 <?php
3 /**
4 * A mock WebRequest.
6 * If the code under test accesses the response via the request (see
7 * WebRequest#response), then you might be able to use this mock to simplify
8 * your tests.
9 */
10 class MockWebRequest extends WebRequest
12 /**
13 * @var WebResponse
15 protected $response;
17 public function __construct( WebResponse $response ) {
18 parent::__construct();
20 $this->response = $response;
23 public function response() {
24 return $this->response;