class MockHttpClient in Video Embed Field 8
Same name and namespace in other branches
- 8.2 tests/src/Kernel/MockHttpClient.php \Drupal\Tests\video_embed_field\Kernel\MockHttpClient
An exceptional HTTP client mock.
Hierarchy
- class \Drupal\Tests\video_embed_field\Kernel\MockHttpClient implements \GuzzleHttp\ClientInterface
Expanded class hierarchy of MockHttpClient
1 file declares its use of MockHttpClient
- ProviderUrlParseTest.php in tests/
src/ Unit/ ProviderUrlParseTest.php
File
- tests/
src/ Kernel/ MockHttpClient.php, line 11
Namespace
Drupal\Tests\video_embed_field\KernelView source
class MockHttpClient implements ClientInterface {
/**
* An exception message for the client methods.
*/
const EXCEPTION_MESSAGE = "The HTTP mock can't do anything.";
/**
* {@inheritdoc}
*/
public function send(RequestInterface $request, array $options = []) {
throw new \Exception(static::EXCEPTION_MESSAGE);
}
/**
* {@inheritdoc}
*/
public function sendAsync(RequestInterface $request, array $options = []) {
throw new \Exception(static::EXCEPTION_MESSAGE);
}
/**
* {@inheritdoc}
*/
public function request($method, $uri, array $options = []) {
throw new \Exception(static::EXCEPTION_MESSAGE);
}
/**
* {@inheritdoc}
*/
public function requestAsync($method, $uri, array $options = []) {
throw new \Exception(static::EXCEPTION_MESSAGE);
}
/**
* {@inheritdoc}
*/
public function getConfig($option = NULL) {
throw new \Exception(static::EXCEPTION_MESSAGE);
}
/**
* Patch up a magic method call.
*/
public function head($url) {
throw new \Exception(static::EXCEPTION_MESSAGE);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MockHttpClient:: |
constant | An exception message for the client methods. | ||
MockHttpClient:: |
public | function | Get a client configuration option. | |
MockHttpClient:: |
public | function | Patch up a magic method call. | |
MockHttpClient:: |
public | function | Create and send an HTTP request. | |
MockHttpClient:: |
public | function | Create and send an asynchronous HTTP request. | |
MockHttpClient:: |
public | function | Send an HTTP request. | |
MockHttpClient:: |
public | function | Asynchronously send an HTTP request. |