abstract class TaxonomyTestBase in Drupal 10
Same name in this branch
- 10 core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\TaxonomyTestBase
- 10 core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyTestBase
- 10 core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Kernel\Views\TaxonomyTestBase
Same name and namespace in other branches
- 8 core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\TaxonomyTestBase
- 9 core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php \Drupal\Tests\taxonomy\Functional\TaxonomyTestBase
Provides common helper methods for Taxonomy module tests.
Hierarchy
- class \Drupal\Tests\BrowserTestBase extends \PHPUnit\Framework\TestCase uses \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, FunctionalTestSetupTrait, TestSetupTrait, BlockCreationTrait, ConfigTestTrait, ExtensionListTestTrait, ContentTypeCreationTrait, NodeCreationTrait, RandomGeneratorTrait, TestRequirementsTrait, PhpUnitWarnings, UiHelperTrait, UserCreationTrait, XdebugRequestTrait
- class \Drupal\Tests\taxonomy\Functional\TaxonomyTestBase uses EntityReferenceTestTrait, TaxonomyTestTrait
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\FunctionalView 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',
]);
}
}
}