You are here

public function StreamWrapperTest::testSetClient in AmazonS3 7.2

Test setting an S3 client.

@covers \Drupal\amazons3\StreamWrapper::setClient @covers \Drupal\amazons3\StreamWrapper::getClient

File

tests/StreamWrapperTest.php, line 147

Class

StreamWrapperTest
Tests \Drupal\amazons3\StreamWrapper.

Namespace

Drupal\amazons3Test

Code

public function testSetClient() {
  $client = S3Client::factory([
    'credentials' => new Credentials('placeholder', 'placeholder'),
  ]);
  StreamWrapper::setClient($client);
  $this
    ->assertSame($client, StreamWrapper::getClient());
}