MailchimpTestHttpClient.php in Mailchimp 8
File
lib/mailchimp-api-php/tests/src/MailchimpTestHttpClient.php
View source
<?php
namespace Mailchimp\Tests;
use GuzzleHttp\Exception\RequestException;
use Mailchimp\http\MailchimpHttpClientInterface;
use Mailchimp\MailchimpAPIException;
class MailchimpTestHttpClient implements MailchimpHttpClientInterface {
public $method;
public $uri;
public $options;
public function handleRequest($method, $uri = '', $options = [], $parameters = [], $returnAssoc = FALSE) {
if (!empty($parameters)) {
if ($method == 'GET') {
$options['query'] = $parameters;
}
else {
$options['json'] = (object) $parameters;
}
}
$this->method = $method;
$this->uri = $uri;
$this->options = $options;
return new MailchimpTestHttpResponse();
}
}