diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-11-19 04:00:47 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-11-19 04:00:47 +0000 |
commit | cb98091e1b677476b873dd3d557200576b32559e (patch) | |
tree | 29c602772b3bf757ec0530ec90c4aa334f14193c /modules/node/tests | |
parent | bf703452de025483a9a8b8721068f28edcf81893 (diff) | |
download | brdo-cb98091e1b677476b873dd3d557200576b32559e.tar.gz brdo-cb98091e1b677476b873dd3d557200576b32559e.tar.bz2 |
#108818 by David Strauss, chx, Crell: Add transactions to key X_save() routines.
Diffstat (limited to 'modules/node/tests')
-rw-r--r-- | modules/node/tests/node_test_exception.info | 8 | ||||
-rw-r--r-- | modules/node/tests/node_test_exception.module | 17 |
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.'); + } +} |