You are here

protected function FileFieldTestBase::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/file/src/Tests/FileFieldTestBase.php \Drupal\file\Tests\FileFieldTestBase::setUp()

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

Installs Drupal with the installation profile specified in \Drupal\simpletest\WebTestBase::$profile into the prefixed database.

Afterwards, installs any additional modules specified in the static \Drupal\simpletest\WebTestBase::$modules property of each class in the class hierarchy.

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.

Overrides WebTestBase::setUp

5 calls to FileFieldTestBase::setUp()
FileFieldAttributesTest::setUp in core/modules/rdf/src/Tests/FileFieldAttributesTest.php
Sets up a Drupal site for running functional and integration tests.
FileFieldWidgetTest::setUp in core/modules/file/src/Tests/FileFieldWidgetTest.php
Sets up a Drupal site for running functional and integration tests.
FileListingTest::setUp in core/modules/file/src/Tests/FileListingTest.php
Sets up a Drupal site for running functional and integration tests.
FilePrivateTest::setUp in core/modules/file/src/Tests/FilePrivateTest.php
Sets up a Drupal site for running functional and integration tests.
PrivateFileOnTranslatedEntityTest::setUp in core/modules/file/src/Tests/PrivateFileOnTranslatedEntityTest.php
Sets up a Drupal site for running functional and integration tests.
5 methods override FileFieldTestBase::setUp()
FileFieldAttributesTest::setUp in core/modules/rdf/src/Tests/FileFieldAttributesTest.php
Sets up a Drupal site for running functional and integration tests.
FileFieldWidgetTest::setUp in core/modules/file/src/Tests/FileFieldWidgetTest.php
Sets up a Drupal site for running functional and integration tests.
FileListingTest::setUp in core/modules/file/src/Tests/FileListingTest.php
Sets up a Drupal site for running functional and integration tests.
FilePrivateTest::setUp in core/modules/file/src/Tests/FilePrivateTest.php
Sets up a Drupal site for running functional and integration tests.
PrivateFileOnTranslatedEntityTest::setUp in core/modules/file/src/Tests/PrivateFileOnTranslatedEntityTest.php
Sets up a Drupal site for running functional and integration tests.

File

core/modules/file/src/Tests/FileFieldTestBase.php, line 35
Contains \Drupal\file\Tests\FileFieldTestBase.

Class

FileFieldTestBase
Provides methods specifically for testing File module's field handling.

Namespace

Drupal\file\Tests

Code

protected function setUp() {
  parent::setUp();
  $this->adminUser = $this
    ->drupalCreateUser(array(
    'access content',
    'access administration pages',
    'administer site configuration',
    'administer users',
    'administer permissions',
    'administer content types',
    'administer node fields',
    'administer node display',
    'administer nodes',
    'bypass node access',
  ));
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalCreateContentType(array(
    'type' => 'article',
    'name' => 'Article',
  ));
}