You are here

abstract class TaxonomyTestBase in Drupal 10

Same name in this branch
  1. 10 core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\TaxonomyTestBase
  2. 10 core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyTestBase
  3. 10 core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Kernel\Views\TaxonomyTestBase
Same name and namespace in other branches
  1. 8 core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\TaxonomyTestBase
  2. 9 core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\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() : void {
    parent::setUp();
    $this
      ->drupalPlaceBlock('system_breadcrumb_block');

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

}

Members