You are here

protected function S3FileTestTrait::setS3fsConfig in Acquia Content Hub 8.2

Configures s3fs.settings.

Parameters

string $bucket: The s3 bucket name.

string $root_folder: The 'subfolder' inside the bucket.

Throws

\Exception

3 calls to S3FileTestTrait::setS3fsConfig()
S3FileOriginLocatorTest::testGetS3FileSourcePublisherHasNoRoot in modules/acquia_contenthub_s3/tests/src/Kernel/S3FileOriginLocatorTest.php
@covers ::getS3FileSource @dataProvider sourceDataProvider
S3FileOriginLocatorTest::testGetS3FileSourcePublisherHasRoot in modules/acquia_contenthub_s3/tests/src/Kernel/S3FileOriginLocatorTest.php
@covers ::getS3FileSource @dataProvider sourceDataProvider
S3FileOriginLocatorTest::testNoRecordLocally in modules/acquia_contenthub_s3/tests/src/Kernel/S3FileOriginLocatorTest.php
@covers ::getS3FileSource

File

modules/acquia_contenthub_s3/tests/src/Kernel/S3FileTestTrait.php, line 109

Class

S3FileTestTrait
Provides common methods for s3 related tests.

Namespace

Drupal\Tests\acquia_contenthub_s3\Kernel

Code

protected function setS3fsConfig(string $bucket, string $root_folder) : void {
  \Drupal::getContainer()
    ->get('config.factory')
    ->getEditable('s3fs.settings')
    ->set('bucket', $bucket)
    ->set('root_folder', $root_folder)
    ->save();
}