public function S3ClientTest::testCurlOptions in AmazonS3 7.2
@covers \Drupal\amazons3\S3Client::factory
File
- tests/
S3ClientTest.php, line 67
Class
Namespace
Drupal\amazons3Code
public function testCurlOptions() {
$client = DrupalS3Client::factory();
$curl = $client
->getConfig('curl.options');
$this
->assertArraySubset([
CURLOPT_CONNECTTIMEOUT => 30,
], $curl);
$config = [
'curl.options' => [
CURLOPT_CONNECTTIMEOUT => 10,
],
];
$client = DrupalS3Client::factory($config);
$curl = $client
->getConfig('curl.options');
$this
->assertArraySubset([
CURLOPT_CONNECTTIMEOUT => 10,
], $curl);
$config = [
'curl.options' => [
CURLOPT_VERBOSE => TRUE,
],
];
$client = DrupalS3Client::factory($config);
$curl = $client
->getConfig('curl.options');
$this
->assertArraySubset([
CURLOPT_CONNECTTIMEOUT => 30,
], $curl);
$this
->assertArraySubset([
CURLOPT_VERBOSE => TRUE,
], $curl);
}