You are here

public function S3ClientTest::testValidateBucketExists in AmazonS3 7.2

@covers \Drupal\amazons3\S3Client::validateBucketExists

File

tests/S3ClientTest.php, line 50

Class

S3ClientTest
Tests \Drupal\amazons3\S3Client.

Namespace

Drupal\amazons3

Code

public function testValidateBucketExists() {
  $client = $this
    ->mockClient();
  $this
    ->setMockResponse($client, array(
    new Response(200),
  ));
  $exception = NULL;
  try {
    DrupalS3Client::validateBucketExists('bucket', $client);
  } catch (\Exception $exception) {
  }
  $this
    ->assertNull($exception, 'The bucket was validated to exist.');
}