You are here

protected function PathFieldDefinitionTest::getModuleAndPath in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/path/tests/src/Unit/Field/PathFieldDefinitionTest.php \Drupal\Tests\path\Unit\Field\PathFieldDefinitionTest::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'.

Overrides BaseFieldDefinitionTestBase::getModuleAndPath

File

core/modules/path/tests/src/Unit/Field/PathFieldDefinitionTest.php, line 23

Class

PathFieldDefinitionTest
@coversDefaultClass \Drupal\Core\Field\BaseFieldDefinition @group path

Namespace

Drupal\Tests\path\Unit\Field

Code

protected function getModuleAndPath() {
  return [
    'path',
    dirname(dirname(dirname(dirname(__DIR__)))),
  ];
}