function BaseFieldDefinitionTestBase::getModuleAndPath

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Field/BaseFieldDefinitionTestBase.php \Drupal\Tests\Core\Field\BaseFieldDefinitionTestBase::getModuleAndPath()
  2. 10 core/tests/Drupal/Tests/Core/Field/BaseFieldDefinitionTestBase.php \Drupal\Tests\Core\Field\BaseFieldDefinitionTestBase::getModuleAndPath()
  3. 11.x core/tests/Drupal/Tests/Core/Field/BaseFieldDefinitionTestBase.php \Drupal\Tests\Core\Field\BaseFieldDefinitionTestBase::getModuleAndPath()

Returns the module name and the module directory for the plugin.

Function drupal_get_path() cannot be used here, because it is not available in Drupal PHPUnit tests.

Return value

array A one-dimensional array containing the following strings:

  • The module name.
  • The module directory, e.g. DRUPAL_CORE . 'core/modules/path'.
1 call to BaseFieldDefinitionTestBase::getModuleAndPath()
BaseFieldDefinitionTestBase::setUp in core/tests/Drupal/Tests/Core/Field/BaseFieldDefinitionTestBase.php
1 method overrides BaseFieldDefinitionTestBase::getModuleAndPath()
PathFieldDefinitionTest::getModuleAndPath in core/modules/path/tests/src/Unit/Field/PathFieldDefinitionTest.php
Returns the module name and the module directory for the plugin.

File

core/tests/Drupal/Tests/Core/Field/BaseFieldDefinitionTestBase.php, line 76

Class

BaseFieldDefinitionTestBase
Provides setup method for testing base field definitions.

Namespace

Drupal\Tests\Core\Field

Code

protected abstract function getModuleAndPath();

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