class TaxonomyTestBase

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

Provides common helper methods for Taxonomy module tests.

Hierarchy

Expanded class hierarchy of TaxonomyTestBase

2 files declare their use of TaxonomyTestBase
EntityReferenceFieldAttributesTest.php in core/modules/rdf/tests/src/Functional/EntityReferenceFieldAttributesTest.php
TaxonomyAttributesTest.php in core/modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php

File

core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php, line 12

Namespace

Drupal\Tests\taxonomy\Functional
View source
abstract class TaxonomyTestBase extends BrowserTestBase {
  use TaxonomyTestTrait;
  use EntityReferenceTestTrait;
  
  /**
   * Modules to enable.
   *
   * @var array
   */
  protected static $modules = [
    'taxonomy',
    'block',
  ];
  
  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();
    $this->drupalPlaceBlock('system_breadcrumb_block');
    // Create Basic page and Article node types.
    if ($this->profile != 'standard') {
      $this->drupalCreateContentType([
        'type' => 'article',
        'name' => 'Article',
      ]);
    }
  }

}

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