diff --git a/core/modules/inline_form_errors/src/SupportedRenderElementHelper.php b/core/modules/inline_form_errors/src/SupportedRenderElementHelper.php index 031920c..b3a82ba 100644 --- a/core/modules/inline_form_errors/src/SupportedRenderElementHelper.php +++ b/core/modules/inline_form_errors/src/SupportedRenderElementHelper.php @@ -9,7 +9,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Provides a way to check if a render element type supports inline form errors. + * Provides functionality to determine and process supported render elements. */ class SupportedRenderElementHelper implements ContainerInjectionInterface { @@ -52,14 +52,14 @@ public static function create(ContainerInterface $container) { } /** - * Determines if an element type supports inline form errors. + * Determines if an element type supports Inline Form Errors. * * @param string $element_type * The element type. * * @return bool * TRUE if the given element type is a form element or a render element - * which supports inline form errors, or FALSE otherwise. + * which supports Inline Form Errors, or FALSE otherwise. */ public function supportsInlineFormErrors($element_type) { return in_array($element_type, $this->pseudoFormElements) || $this->isFormElement($element_type); diff --git a/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php b/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php index 3264f54..f110b36 100644 --- a/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php +++ b/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php @@ -140,7 +140,7 @@ public function testSetElementErrorsFromFormState() { } /** - * Tests that opting out of inline form errors works. + * Tests that opting out of Inline Form Errors works. */ public function testDisplayErrorMessagesNotInline() { $form_error_handler = $this->getMockBuilder(FormErrorHandler::class) diff --git a/core/modules/inline_form_errors/tests/src/Unit/SupportedRenderElementHelperTest.php b/core/modules/inline_form_errors/tests/src/Unit/SupportedRenderElementHelperTest.php index 8e8eae9..ebce4bd 100644 --- a/core/modules/inline_form_errors/tests/src/Unit/SupportedRenderElementHelperTest.php +++ b/core/modules/inline_form_errors/tests/src/Unit/SupportedRenderElementHelperTest.php @@ -17,9 +17,17 @@ class SupportedRenderElementHelperTest extends UnitTestCase { /** * @covers ::supportsInlineFormErrors * @covers ::isFormElement + * * @dataProvider providerTestSupportsInlineFormErrors + * + * @param string $element_type + * The name of the element type. + * @param array $definition + * The element type definition. + * @param bool $expected + * Whether the element type is expected to support Inline Form Errors. */ - public function testSupportsInlineFormErrors($element_type, $definition, $expected) { + public function testSupportsInlineFormErrors($element_type, array $definition, $expected) { $element_info_manager = $this->prophesize(ElementInfoManager::class); if ($definition) { $element_info_manager->hasDefinition($element_type)->willReturn(TRUE);