You are here

protected function S3fsUrlGenerationTest::setUp in S3 File System 8.3

Same name and namespace in other branches
  1. 4.0.x tests/src/Functional/S3fsUrlGenerationTest.php \Drupal\Tests\s3fs\Functional\S3fsUrlGenerationTest::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/Functional/S3fsUrlGenerationTest.php, line 39

Class

S3fsUrlGenerationTest
S3 File System Tests.

Namespace

Drupal\Tests\s3fs\Functional

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->config('s3fs.settings')
    ->set('presigned_urls', "600|signreq/*\n300|shortsignttl/*")
    ->set('saveas', '.*saveas/*')
    ->set('torrents', '.*tordir/*')
    ->set('bucket', '513ec7bfc9ac489781a764057973d870')
    ->set('region', 'us-east-1')
    ->save();

  // Write the access key settings into the config.
  $settings = [];
  $settings['settings']['s3fs.access_key'] = (object) [
    'value' => 'BogusAccessKey',
    'required' => TRUE,
  ];
  $settings['settings']['s3fs.secret_key'] = (object) [
    'value' => 'BogusSecretKey',
    'required' => TRUE,
  ];
  $this
    ->writeSettings($settings);
}