protected function FileTestBase::configureDownloadDirectory in Ubercart 8.4
Helper function to configure the file downloads directory.
Uses BrowserTestBase::tempFilesDirectory as a place to store the downloads for the tests, but this is NOT where you'd put the downloads directory on a live site. On a live site, it should be outside the web root.
1 call to FileTestBase::configureDownloadDirectory()
- FileTestBase::setUp in uc_file/
tests/ src/ Functional/ FileTestBase.php
File
- uc_file/
tests/ src/ Functional/ FileTestBase.php, line 80
Class
- FileTestBase
- Base class for file download feature tests.
Namespace
Drupal\Tests\uc_file\FunctionalCode
protected function configureDownloadDirectory() {
$this
->drupalGet('admin/store/config/file');
$this
->submitForm([
'base_dir' => $this->tempFilesDirectory,
], 'Save configuration');
// Verify download file path has been set.
$this
->assertSession()
->fieldValueEquals('base_dir', $this->tempFilesDirectory);
}