Version 1
[yaffs-website] / web / core / modules / help / tests / modules / help_test / src / SupernovaGenerator.php
diff --git a/web/core/modules/help/tests/modules/help_test/src/SupernovaGenerator.php b/web/core/modules/help/tests/modules/help_test/src/SupernovaGenerator.php
new file mode 100644 (file)
index 0000000..9cdaa41
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+
+namespace Drupal\help_test;
+
+use Drupal\Core\Routing\UrlGeneratorInterface;
+use Symfony\Component\Routing\RequestContext;
+
+/**
+ * Implements a URL generator which always thrown an exception.
+ */
+class SupernovaGenerator implements UrlGeneratorInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setContext(RequestContext $context) {
+    throw new \Exception();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getContext() {
+    throw new \Exception();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH) {
+    throw new \Exception();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getPathFromRoute($name, $parameters = []) {
+    throw new \Exception();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function generateFromRoute($name, $parameters = [], $options = [], $collect_bubbleable_metadata = FALSE) {
+    throw new \Exception();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function supports($name) {
+    throw new \Exception();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getRouteDebugMessage($name, array $parameters = []) {
+    throw new \Exception();
+  }
+
+}