function TaxonomyTestBase::setUp

Same name in this branch
  1. main core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Kernel\Views\TaxonomyTestBase::setUp()
  2. main core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\TaxonomyTestBase::setUp()
  3. main core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyTestBase::setUp()
Same name and namespace in other branches
  1. 8.9.x core/modules/taxonomy/src/Tests/TaxonomyTestBase.php \Drupal\taxonomy\Tests\TaxonomyTestBase::setUp()
  2. 11.x core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Kernel\Views\TaxonomyTestBase::setUp()
  3. 11.x core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\TaxonomyTestBase::setUp()
  4. 11.x core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyTestBase::setUp()
  5. 10 core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Kernel\Views\TaxonomyTestBase::setUp()
  6. 10 core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\TaxonomyTestBase::setUp()
  7. 10 core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyTestBase::setUp()
  8. 9 core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Kernel\Views\TaxonomyTestBase::setUp()
  9. 9 core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\TaxonomyTestBase::setUp()
  10. 9 core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyTestBase::setUp()
  11. 8.9.x core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Kernel\Views\TaxonomyTestBase::setUp()
  12. 8.9.x core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\TaxonomyTestBase::setUp()
  13. 8.9.x core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyTestBase::setUp()

Overrides KernelTestBase::setUp

4 calls to TaxonomyTestBase::setUp()
RssTest::setUp in core/modules/taxonomy/tests/src/Kernel/RssTest.php
TaxonomyTermPageVariableDeprecationTest::setUp in core/modules/taxonomy/tests/src/Kernel/TaxonomyTermPageVariableDeprecationTest.php
TermTranslationFieldViewTest::setUp in core/modules/taxonomy/tests/src/Kernel/TermTranslationFieldViewTest.php
TermTranslationTest::setUp in core/modules/taxonomy/tests/src/Kernel/TermTranslationTest.php
4 methods override TaxonomyTestBase::setUp()
RssTest::setUp in core/modules/taxonomy/tests/src/Kernel/RssTest.php
TaxonomyTermPageVariableDeprecationTest::setUp in core/modules/taxonomy/tests/src/Kernel/TaxonomyTermPageVariableDeprecationTest.php
TermTranslationFieldViewTest::setUp in core/modules/taxonomy/tests/src/Kernel/TermTranslationFieldViewTest.php
TermTranslationTest::setUp in core/modules/taxonomy/tests/src/Kernel/TermTranslationTest.php

File

core/modules/taxonomy/tests/src/Kernel/TaxonomyTestBase.php, line 57

Class

TaxonomyTestBase
Provides common helper methods for Taxonomy module tests.

Namespace

Drupal\Tests\taxonomy\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this->installSchema('node', 'node_access');
  $this->installEntitySchema('node');
  $this->installEntitySchema('user');
  $this->installEntitySchema('taxonomy_term');
  $this->installConfig([
    'node',
    'system',
    'taxonomy',
    'filter',
  ]);
  \Drupal::service(ThemeInstallerInterface::class)->install([
    'stark',
  ]);
  $this->drupalPlaceBlock('system_breadcrumb_block', [
    'theme' => 'stark',
    'region' => 'content',
  ]);
  // Create Article node type.
  $this->drupalCreateContentType([
    'type' => 'article',
    'name' => 'Article',
  ]);
}

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