function FileManagedTestBase::setUp

Sets up a Drupal site for running functional and integration tests.

Generates a random database prefix and installs Drupal with the specified installation profile in Drupal\simpletest\WebTestBase::$profile into the prefixed database. Afterwards, installs any additional modules specified by the test.

After installation all caches are flushed and several configuration values are reset to the values of the parent site executing the test, since the default values may be incompatible with the environment in which tests are being executed.

Parameters

...: List of modules to enable for the duration of the test. This can be either a single array or a variable number of string arguments.

Overrides FileTestBase::setUp

See also

Drupal\simpletest\WebTestBase::prepareDatabasePrefix()

Drupal\simpletest\WebTestBase::changeDatabasePrefix()

Drupal\simpletest\WebTestBase::prepareEnvironment()

4 calls to FileManagedTestBase::setUp()
DownloadTest::setUp in drupal/core/modules/file/lib/Drupal/file/Tests/DownloadTest.php
Sets up a Drupal site for running functional and integration tests.
SaveUploadTest::setUp in drupal/core/modules/file/lib/Drupal/file/Tests/SaveUploadTest.php
Sets up a Drupal site for running functional and integration tests.
SpaceUsedTest::setUp in drupal/core/modules/file/lib/Drupal/file/Tests/SpaceUsedTest.php
Sets up a Drupal site for running functional and integration tests.
ValidatorTest::setUp in drupal/core/modules/file/lib/Drupal/file/Tests/ValidatorTest.php
Sets up a Drupal site for running functional and integration tests.
4 methods override FileManagedTestBase::setUp()
DownloadTest::setUp in drupal/core/modules/file/lib/Drupal/file/Tests/DownloadTest.php
Sets up a Drupal site for running functional and integration tests.
SaveUploadTest::setUp in drupal/core/modules/file/lib/Drupal/file/Tests/SaveUploadTest.php
Sets up a Drupal site for running functional and integration tests.
SpaceUsedTest::setUp in drupal/core/modules/file/lib/Drupal/file/Tests/SpaceUsedTest.php
Sets up a Drupal site for running functional and integration tests.
ValidatorTest::setUp in drupal/core/modules/file/lib/Drupal/file/Tests/ValidatorTest.php
Sets up a Drupal site for running functional and integration tests.

File

drupal/core/modules/file/lib/Drupal/file/Tests/FileManagedTestBase.php, line 26
Definition of Drupal\file\Tests\FileManagedTestBase.

Class

FileManagedTestBase
Base class for file tests that use the file_test module to test uploads and hooks.

Namespace

Drupal\file\Tests

Code

function setUp() {
  parent::setUp();

  // Clear out any hook calls.
  file_test_reset();
}