From 7cd2d245c476b7345bad782ef28934fd18dadaa9 Mon Sep 17 00:00:00 2001 From: ADmad Date: Sun, 10 Nov 2019 18:59:00 +0530 Subject: [PATCH] Commit file missed earlier --- .../View/Widget/TestUsingViewWidget.php | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 tests/test_app/TestApp/View/Widget/TestUsingViewWidget.php 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']]; + } +}