summaryrefslogtreecommitdiff
path: root/modules/node/tests
diff options
context:
space:
mode:
Diffstat (limited to 'modules/node/tests')
-rw-r--r--modules/node/tests/node_test_exception.info8
-rw-r--r--modules/node/tests/node_test_exception.module17
2 files changed, 25 insertions, 0 deletions
diff --git a/modules/node/tests/node_test_exception.info b/modules/node/tests/node_test_exception.info
new file mode 100644
index 000000000..afe5b3719
--- /dev/null
+++ b/modules/node/tests/node_test_exception.info
@@ -0,0 +1,8 @@
+; $Id$
+name = "Node module exception tests"
+description = "Support module for node related exception testing."
+package = Testing
+version = VERSION
+core = 7.x
+files[] = node_test_exception.module
+hidden = TRUE
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.');
+ }
+}