You are here

public function StreamWrapperTest::testSetS3ClientClass in AmazonS3 7.2

Test that we can set a different S3 client class.

@covers \Drupal\amazons3\StreamWrapper::setS3ClientClass

File

tests/StreamWrapperTest.php, line 335

Class

StreamWrapperTest
Tests \Drupal\amazons3\StreamWrapper.

Namespace

Drupal\amazons3Test

Code

public function testSetS3ClientClass() {
  StreamWrapper::setS3ClientClass('Drupal\\amazons3Test\\Stub\\S3Client');
  StreamWrapper::setClient(NULL);
  DrupalS3Client::resetCalled();
  new StreamWrapper();
  $this
    ->assertTrue(DrupalS3Client::isFactoryCalled());
}