TaxonomyTestBase.php

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

Namespace

Drupal\taxonomy\Tests

File

core/modules/taxonomy/src/Tests/TaxonomyTestBase.php

View source
<?php

namespace Drupal\taxonomy\Tests;

@trigger_error(__NAMESPACE__ . '\\TaxonomyTestBase is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use \\Drupal\\Tests\\taxonomy\\Functional\\TaxonomyTestBase', E_USER_DEPRECATED);
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\field\Traits\EntityReferenceTestTrait;
use Drupal\Tests\taxonomy\Traits\TaxonomyTestTrait;

/**
 * Provides common helper methods for Taxonomy module tests.
 *
 * @deprecated in drupal:8.?.? and is removed from drupal:9.0.0.
 *   Use \Drupal\Tests\taxonomy\Functional\TaxonomyTestBase instead.
 */
abstract class TaxonomyTestBase extends WebTestBase {
    use TaxonomyTestTrait;
    use EntityReferenceTestTrait;
    
    /**
     * Modules to enable.
     *
     * @var array
     */
    public 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',
            ]);
        }
    }

}

Classes

Title Deprecated Summary
TaxonomyTestBase

in drupal:8.?.? and is removed from drupal:9.0.0. Use \Drupal\Tests\taxonomy\Functional\TaxonomyTestBase instead.

Provides common helper methods for Taxonomy module tests.

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