You are here

protected function PathFieldDefinitionTest::getModuleAndPath in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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.

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 28
Contains \Drupal\Tests\path\Unit\Field\PathFieldDefinitionTest.

Class

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

Namespace

Drupal\Tests\path\Unit\Field

Code

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