/**
* Returns a mocked schema element.
*
* @param array $definition
* The definition of the schema element.
*
* @return \Drupal\Core\Config\Schema\Element
* The mocked schema element.
*/
protected function getElement(array
$definition) { $data_definition =
new DataDefinition($definition);
$element =
$this->
createMock('Drupal\Core\TypedData\TypedDataInterface'
);
$element->
expects($this->
any()) ->
method('getDataDefinition'
) ->
willReturn($data_definition);
return $element;
} /**
* Returns a mocked nested schema element.
*
* @param array $elements
* An array of simple schema elements.
*
* @return \Drupal\Core\Config\Schema\Mapping
* A nested schema element, containing the passed-in elements.
*/