summaryrefslogtreecommitdiff
path: root/modules/node/tests/node_test_exception.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/node/tests/node_test_exception.module')
-rw-r--r--modules/node/tests/node_test_exception.module17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/node/tests/node_test_exception.module b/modules/node/tests/node_test_exception.module
new file mode 100644
index 000000000..7b09c77c7
--- /dev/null
+++ b/modules/node/tests/node_test_exception.module
@@ -0,0 +1,17 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * Dummy module implementing node related hooks to test API interaction with
+ * the Node module.
+ */
+
+/**
+ * Implement hook_node_insert().
+ */
+function node_test_exception_node_insert($node) {
+ if ($node->title['zxx'][0]['value'] == 'testing_transaction_exception') {
+ throw new Exception('Test exception for rollback.');
+ }
+}