function TaxonomyTestBase::setUp

Same name in this branch

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 WebTestBase::setUp

See also

Drupal\simpletest\WebTestBase::prepareDatabasePrefix()

Drupal\simpletest\WebTestBase::changeDatabasePrefix()

Drupal\simpletest\WebTestBase::prepareEnvironment()

15 calls to TaxonomyTestBase::setUp()
EfqTest::setUp in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/EfqTest.php
Sets up a Drupal site for running functional and integration tests.
HooksTest::setUp in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/HooksTest.php
Sets up a Drupal site for running functional and integration tests.
LegacyTest::setUp in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/LegacyTest.php
Sets up a Drupal site for running functional and integration tests.
LoadMultipleTest::setUp in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/LoadMultipleTest.php
Sets up a Drupal site for running functional and integration tests.
RssTest::setUp in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/RssTest.php
Sets up a Drupal site for running functional and integration tests.

... See full list

15 methods override TaxonomyTestBase::setUp()
EfqTest::setUp in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/EfqTest.php
Sets up a Drupal site for running functional and integration tests.
HooksTest::setUp in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/HooksTest.php
Sets up a Drupal site for running functional and integration tests.
LegacyTest::setUp in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/LegacyTest.php
Sets up a Drupal site for running functional and integration tests.
LoadMultipleTest::setUp in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/LoadMultipleTest.php
Sets up a Drupal site for running functional and integration tests.
RssTest::setUp in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/RssTest.php
Sets up a Drupal site for running functional and integration tests.

... See full list

File

drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTestBase.php, line 24
Definition of Drupal\taxonomy\Tests\TaxonomyTestBase.

Class

TaxonomyTestBase
Provides common helper methods for Taxonomy module tests.

Namespace

Drupal\taxonomy\Tests

Code

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

  // Create Basic page and Article node types.
  if ($this->profile != 'standard') {
    $this
      ->drupalCreateContentType(array(
      'type' => 'article',
      'name' => 'Article',
    ));
  }
}