Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / system / tests / modules / render_array_non_html_subscriber_test / src / RenderArrayNonHtmlSubscriberTestController.php
diff --git a/web/core/modules/system/tests/modules/render_array_non_html_subscriber_test/src/RenderArrayNonHtmlSubscriberTestController.php b/web/core/modules/system/tests/modules/render_array_non_html_subscriber_test/src/RenderArrayNonHtmlSubscriberTestController.php
new file mode 100644 (file)
index 0000000..73a4622
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+
+namespace Drupal\render_array_non_html_subscriber_test;
+
+use Drupal\Core\Controller\ControllerBase;
+use Symfony\Component\HttpFoundation\Response;
+
+class RenderArrayNonHtmlSubscriberTestController extends ControllerBase {
+
+  /**
+   * @return string
+   */
+  public function rawString() {
+    return new Response($this->t('Raw controller response.'));
+  }
+
+  /**
+   * @return array
+   */
+  public function renderArray() {
+    return [
+      '#type' => 'html_tag',
+      '#tag' => 'p',
+      '#value' => $this->t('Controller response successfully rendered.'),
+    ];
+  }
+
+}