diff --git a/tests/test_app/TestApp/View/Widget/TestUsingViewWidget.php b/tests/test_app/TestApp/View/Widget/TestUsingViewWidget.php new file mode 100644 index 00000000000..f7c6865a150 --- /dev/null +++ b/tests/test_app/TestApp/View/Widget/TestUsingViewWidget.php @@ -0,0 +1,53 @@ +_templates = $templates; + $this->_view = $view; + } + + public function getView(): View + { + return $this->_view; + } + + public function render(array $data, ContextInterface $context): string + { + return ''; + } + + public function secureFields(array $data): array + { + if (!isset($data['name']) || $data['name'] === '') { + return []; + } + + return [$data['name']]; + } +}