InstallerConfigDirectorySetNoDirectoryTest.php in Drupal 8
File
core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php
View source
<?php
namespace Drupal\FunctionalTests\Installer;
use Drupal\Component\Utility\Crypt;
class InstallerConfigDirectorySetNoDirectoryTest extends InstallerTestBase {
protected $defaultTheme = 'stark';
protected $syncDirectory;
protected function prepareEnvironment() {
parent::prepareEnvironment();
$this->syncDirectory = $this->publicFilesDirectory . '/config_' . Crypt::randomBytesBase64() . '/sync';
$this->settings['settings']['config_sync_directory'] = (object) [
'value' => $this->syncDirectory,
'required' => TRUE,
];
}
public function testInstaller() {
$this
->assertUrl('user/1');
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertDirectoryExists($this->syncDirectory);
}
}