function LocationTestCase::deleteNode in Location 7.5
Same name and namespace in other branches
- 6.3 tests/location_testcase.php \LocationTestCase::deleteNode()
- 7.3 tests/location_testcase.test \LocationTestCase::deleteNode()
- 7.4 tests/location_testcase.php \LocationTestCase::deleteNode()
Delete a node.
3 calls to LocationTestCase::deleteNode()
File
- tests/
location_testcase.php, line 103 - Common functions for Location tests.
Class
- LocationTestCase
- @file Common functions for Location tests.
Code
function deleteNode($nid) {
// Implemention taken from node_delete, with some assumptions regarding
// function_exists removed.
$node = node_load($nid);
db_query('DELETE FROM {node} WHERE nid = %d', $node->nid);
db_query('DELETE FROM {node_revisions} WHERE nid = %d', $node->nid);
// Call the node-specific callback (if any):
node_invoke($node, 'delete');
node_invoke_nodeapi($node, 'delete');
// Clear the page and block caches.
cache_clear_all();
}