S3fsConfigValidationTest.php in S3 File System 8.3
File
tests/src/Functional/S3fsConfigValidationTest.php
View source
<?php
namespace Drupal\Tests\s3fs\Functional;
use Drupal\Core\StringTranslation\StringTranslationTrait;
class S3fsConfigValidationTest extends S3fsTestBase {
use StringTranslationTrait;
protected static $modules = [
's3fs',
];
public function testReadOnlySetting() {
$s3Config = $this->s3Config;
$s3CustomConfig = $this->s3Config;
$this
->assertEmpty($this->s3fs
->validate($s3Config));
$s3CustomConfig['read_only'] = TRUE;
$errors = $this->s3fs
->validate($s3CustomConfig);
$this
->assertEquals(t('The provided credentials are not read-only.'), $errors[0]);
}
}