You are here

protected function ConfigMapperManagerTest::getElement in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php \Drupal\Tests\config_translation\Unit\ConfigMapperManagerTest::getElement()

Returns a mocked schema element.

Parameters

array $definition: The definition of the schema element.

Return value

\Drupal\Core\Config\Schema\Element The mocked schema element.

1 call to ConfigMapperManagerTest::getElement()
ConfigMapperManagerTest::providerTestHasTranslatable in core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php
Provides data for ConfigMapperManager::testHasTranslatable()

File

core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php, line 146
Contains \Drupal\Tests\config_translation\Unit\ConfigMapperManagerTest.

Class

ConfigMapperManagerTest
Tests the functionality provided by configuration translation mapper manager.

Namespace

Drupal\Tests\config_translation\Unit

Code

protected function getElement(array $definition) {
  $data_definition = new DataDefinition($definition);
  $element = $this
    ->getMock('Drupal\\Core\\TypedData\\TypedDataInterface');
  $element
    ->expects($this
    ->any())
    ->method('getDataDefinition')
    ->will($this
    ->returnValue($data_definition));
  return $element;
}