Version 1
[yaffs-website] / web / core / modules / system / tests / modules / common_test_cron_helper / common_test_cron_helper.module
diff --git a/web/core/modules/system/tests/modules/common_test_cron_helper/common_test_cron_helper.module b/web/core/modules/system/tests/modules/common_test_cron_helper/common_test_cron_helper.module
new file mode 100644 (file)
index 0000000..ee280a3
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+
+/**
+ * @file
+ * Helper module for the testCronExceptions in addition to common_test module.
+ */
+
+/**
+ * Implements hook_cron().
+ *
+ * common_test_cron() throws an exception, but the execution should reach this
+ * function as well.
+ *
+ * @see common_test_cron()
+ */
+function common_test_cron_helper_cron() {
+  \Drupal::state()->set('common_test.cron', 'success');
+}