summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/layout_builder/tests
diff options
context:
space:
mode:
authorDave Long <dave@longwaveconsulting.com>2024-08-22 18:27:50 +0100
committerDave Long <dave@longwaveconsulting.com>2024-08-22 18:27:50 +0100
commit22e2a1285afe3504a865fd43df6d19671f582399 (patch)
tree86cc76388b6fbe158c5adeb4a3f09bd0d4f30503 /core/modules/layout_builder/tests
parent41122f85dd52a3357842f7a6de3827295cda0371 (diff)
downloaddrupal-22e2a1285afe3504a865fd43df6d19671f582399.tar.gz
drupal-22e2a1285afe3504a865fd43df6d19671f582399.zip
Issue #3458422 by mstrelan, smustgrave: Add string return typehints to protected test helper methods
Diffstat (limited to 'core/modules/layout_builder/tests')
-rw-r--r--core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php2
-rw-r--r--core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php2
-rw-r--r--core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php b/core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php
index 549aa1c2504..8004c121b04 100644
--- a/core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php
+++ b/core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php
@@ -95,7 +95,7 @@ class SimpleConfigSectionStorage extends PluginBase implements SectionStorageInt
/**
* Returns the name to be used to store in the config system.
*/
- protected function getConfigName() {
+ protected function getConfigName(): string {
return 'layout_builder_test.' . $this->getStorageType() . '.' . $this->getStorageId();
}
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php
index a006aa29d6a..570bdee7a13 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php
@@ -258,7 +258,7 @@ class InlineBlockPrivateFilesTest extends InlineBlockTestBase {
* @return string
* The text secret.
*/
- protected function getFileSecret(FileInterface $file) {
+ protected function getFileSecret(FileInterface $file): string {
return "The secret in {$file->label()}";
}
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php
index e0664917c55..f5e106cfc9a 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php
@@ -172,7 +172,7 @@ class LayoutBuilderOptInTest extends WebDriverTestBase {
* @return string
* The path.
*/
- protected function getPathForFieldBlock($entity_type_id, $bundle, $view_mode, $field_name) {
+ protected function getPathForFieldBlock($entity_type_id, $bundle, $view_mode, $field_name): string {
$delta = 0;
/** @var \Drupal\layout_builder\Entity\LayoutEntityDisplayInterface $display */
$display = $this->container->get('entity_type.manager')->getStorage('entity_view_display')->load("$entity_type_id.$bundle.$view_mode");