Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / tests / Drupal / FunctionalTests / Bootstrap / ExceptionContainer.php
diff --git a/web/core/tests/Drupal/FunctionalTests/Bootstrap/ExceptionContainer.php b/web/core/tests/Drupal/FunctionalTests/Bootstrap/ExceptionContainer.php
new file mode 100644 (file)
index 0000000..b33d263
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+
+namespace Drupal\FunctionalTests\Bootstrap;
+
+use Drupal\Core\DependencyInjection\Container;
+
+/**
+ * Base container which throws an exception.
+ */
+class ExceptionContainer extends Container {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) {
+    if ($id === 'http_kernel') {
+      throw new \Exception('Thrown exception during Container::get');
+    }
+    else {
+      return parent::get($id, $invalidBehavior);
+    }
+  }
+
+}