MockHttpClient.php in Video Embed Field 8
File
tests/src/Kernel/MockHttpClient.php
View source
<?php
namespace Drupal\Tests\video_embed_field\Kernel;
use GuzzleHttp\ClientInterface;
use Psr\Http\Message\RequestInterface;
class MockHttpClient implements ClientInterface {
const EXCEPTION_MESSAGE = "The HTTP mock can't do anything.";
public function send(RequestInterface $request, array $options = []) {
throw new \Exception(static::EXCEPTION_MESSAGE);
}
public function sendAsync(RequestInterface $request, array $options = []) {
throw new \Exception(static::EXCEPTION_MESSAGE);
}
public function request($method, $uri, array $options = []) {
throw new \Exception(static::EXCEPTION_MESSAGE);
}
public function requestAsync($method, $uri, array $options = []) {
throw new \Exception(static::EXCEPTION_MESSAGE);
}
public function getConfig($option = NULL) {
throw new \Exception(static::EXCEPTION_MESSAGE);
}
public function head($url) {
throw new \Exception(static::EXCEPTION_MESSAGE);
}
}