function node_test_exception_node_insert
Same name in other branches
- 9 core/modules/node/tests/modules/node_test_exception/node_test_exception.module \node_test_exception_node_insert()
- 8.9.x core/modules/node/tests/modules/node_test_exception/node_test_exception.module \node_test_exception_node_insert()
- 10 core/modules/node/tests/modules/node_test_exception/node_test_exception.module \node_test_exception_node_insert()
- 11.x core/modules/node/tests/modules/node_test_exception/node_test_exception.module \node_test_exception_node_insert()
Implements hook_node_insert().
File
-
modules/
node/ tests/ node_test_exception.module, line 11
Code
function node_test_exception_node_insert($node) {
if ($node->title == 'testing_transaction_exception') {
throw new Exception('Test exception for rollback.');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.