class MockClient

Same name in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Test/WebAssertTest.php \Drupal\Tests\Core\Test\MockClient

A mock client.

Hierarchy

  • class \Drupal\Tests\Core\Test\MockClient extends \Symfony\Component\BrowserKit\AbstractBrowser

Expanded class hierarchy of MockClient

File

core/tests/Drupal/Tests/Core/Test/WebAssertTest.php, line 453

Namespace

Drupal\Tests\Core\Test
View source
class MockClient extends AbstractBrowser {
    public function setExpectedResponse(Response $response) : void {
        $this->response = $response;
    }
    protected function doRequest(object $request) : object {
        return $this->response ?? new Response();
    }

}

Members

Title Sort descending Modifiers Object type Summary
MockClient::doRequest protected function
MockClient::setExpectedResponse public function

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.