You are here

protected function TaxonomyTestBase::setUp in Zircon Profile 8

Same name in this branch
  1. 8 core/modules/taxonomy/src/Tests/TaxonomyTestBase.php \Drupal\taxonomy\Tests\TaxonomyTestBase::setUp()
  2. 8 core/modules/taxonomy/src/Tests/Views/TaxonomyTestBase.php \Drupal\taxonomy\Tests\Views\TaxonomyTestBase::setUp()
Same name and namespace in other branches
  1. 8.0 core/modules/taxonomy/src/Tests/Views/TaxonomyTestBase.php \Drupal\taxonomy\Tests\Views\TaxonomyTestBase::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 ViewTestBase::setUp

5 calls to TaxonomyTestBase::setUp()
ArgumentValidatorTermTest::setUp in core/modules/taxonomy/src/Tests/Views/ArgumentValidatorTermTest.php
Sets up a Drupal site for running functional and integration tests.
TaxonomyRelationshipTest::setUp in core/modules/taxonomy/src/Tests/Views/TaxonomyRelationshipTest.php
Sets up a Drupal site for running functional and integration tests.
TaxonomyTermArgumentDepthTest::setUp in core/modules/taxonomy/src/Tests/Views/TaxonomyTermArgumentDepthTest.php
Sets up a Drupal site for running functional and integration tests.
TaxonomyTermFilterDepthTest::setUp in core/modules/taxonomy/src/Tests/Views/TaxonomyTermFilterDepthTest.php
Sets up a Drupal site for running functional and integration tests.
TaxonomyTermViewTest::setUp in core/modules/taxonomy/src/Tests/Views/TaxonomyTermViewTest.php
Sets up a Drupal site for running functional and integration tests.
5 methods override TaxonomyTestBase::setUp()
ArgumentValidatorTermTest::setUp in core/modules/taxonomy/src/Tests/Views/ArgumentValidatorTermTest.php
Sets up a Drupal site for running functional and integration tests.
TaxonomyRelationshipTest::setUp in core/modules/taxonomy/src/Tests/Views/TaxonomyRelationshipTest.php
Sets up a Drupal site for running functional and integration tests.
TaxonomyTermArgumentDepthTest::setUp in core/modules/taxonomy/src/Tests/Views/TaxonomyTermArgumentDepthTest.php
Sets up a Drupal site for running functional and integration tests.
TaxonomyTermFilterDepthTest::setUp in core/modules/taxonomy/src/Tests/Views/TaxonomyTermFilterDepthTest.php
Sets up a Drupal site for running functional and integration tests.
TaxonomyTermViewTest::setUp in core/modules/taxonomy/src/Tests/Views/TaxonomyTermViewTest.php
Sets up a Drupal site for running functional and integration tests.

File

core/modules/taxonomy/src/Tests/Views/TaxonomyTestBase.php, line 58
Contains \Drupal\taxonomy\Tests\Views\TaxonomyTestBase.

Class

TaxonomyTestBase
Base class for all taxonomy tests.

Namespace

Drupal\taxonomy\Tests\Views

Code

protected function setUp() {
  parent::setUp();
  $this
    ->mockStandardInstall();
  ViewTestData::createTestViews(get_class($this), array(
    'taxonomy_test_views',
  ));
  $this->term1 = $this
    ->createTerm();
  $this->term2 = $this
    ->createTerm();
  $node = array();
  $node['type'] = 'article';
  $node['field_views_testing_tags'][]['target_id'] = $this->term1
    ->id();
  $node['field_views_testing_tags'][]['target_id'] = $this->term2
    ->id();
  $this->nodes[] = $this
    ->drupalCreateNode($node);
  $this->nodes[] = $this
    ->drupalCreateNode($node);
}