diff --git a/core/lib/Drupal/Core/Config/Schema/ListElementInterface.php b/core/lib/Drupal/Core/Config/Schema/ListElementInterface.php index b6a384f..02f1d7e 100644 --- a/core/lib/Drupal/Core/Config/Schema/ListElementInterface.php +++ b/core/lib/Drupal/Core/Config/Schema/ListElementInterface.php @@ -38,7 +38,7 @@ public function isEmpty(); public function getElements(); /** - * Gets a element object. + * Gets a contained typed configuration element. * * @param $property_name * The name of the property to get; e.g., 'title' or 'name'. Nested diff --git a/core/modules/config_translation/tests/src/ConfigMapperManagerTest.php b/core/modules/config_translation/tests/src/ConfigMapperManagerTest.php index 86a4719..d7c47cb 100644 --- a/core/modules/config_translation/tests/src/ConfigMapperManagerTest.php +++ b/core/modules/config_translation/tests/src/ConfigMapperManagerTest.php @@ -170,7 +170,12 @@ protected function getElement(array $definition) { * A nested schema element, containing the passed-in elements. */ protected function getNestedElement(array $elements) { - $nested_element = $this->getMock('Drupal\Core\Config\Schema\ListElementInterface'); + // ConfigMapperManager::findTranslatable() checks for the abstract class + // \Drupal\Core\Config\Schema\ArrayElement, but mocking that directly does + // not work. + $nested_element = $this->getMockBuilder('Drupal\Core\Config\Schema\Mapping') + ->disableOriginalConstructor() + ->getMock(); $nested_element->expects($this->once()) ->method('getIterator') ->will($this->returnValue(new \ArrayIterator($elements)));