function DownloadTest::setUp

Same name in this branch
  1. 11.x core/modules/migrate/tests/src/Kernel/process/DownloadTest.php \Drupal\Tests\migrate\Kernel\process\DownloadTest::setUp()
Same name in other branches
  1. 9 core/modules/file/tests/src/Functional/DownloadTest.php \Drupal\Tests\file\Functional\DownloadTest::setUp()
  2. 9 core/modules/migrate/tests/src/Kernel/process/DownloadTest.php \Drupal\Tests\migrate\Kernel\process\DownloadTest::setUp()
  3. 8.9.x core/modules/file/tests/src/Functional/DownloadTest.php \Drupal\Tests\file\Functional\DownloadTest::setUp()
  4. 8.9.x core/modules/migrate/tests/src/Kernel/process/DownloadTest.php \Drupal\Tests\migrate\Kernel\process\DownloadTest::setUp()
  5. 10 core/modules/file/tests/src/Functional/DownloadTest.php \Drupal\Tests\file\Functional\DownloadTest::setUp()
  6. 10 core/modules/migrate/tests/src/Kernel/process/DownloadTest.php \Drupal\Tests\migrate\Kernel\process\DownloadTest::setUp()

Overrides FileManagedTestBase::setUp

File

core/modules/file/tests/src/Functional/DownloadTest.php, line 32

Class

DownloadTest
Tests for download/file transfer functions.

Namespace

Drupal\Tests\file\Functional

Code

protected function setUp() : void {
    parent::setUp();
    // This test currently frequently causes the SQLite database to lock, so
    // skip the test on SQLite until the issue can be resolved.
    // @todo Fix root cause and re-enable in
    //   https://www.drupal.org/project/drupal/issues/3311587
    if (Database::getConnection()->driver() === 'sqlite') {
        $this->markTestSkipped('Test frequently causes a locked database on SQLite');
    }
    $this->fileUrlGenerator = $this->container
        ->get('file_url_generator');
    // Clear out any hook calls.
    file_test_reset();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.