From b7459d8eb3def52ecdd35c65a55fac7e999f6cde Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 24 Nov 2010 16:25:39 +0000 Subject: - Patch #884948 by David_Rothstein: the wrong parameter is sometimes passed in to hook_node_load(). --- modules/node/tests/node_test.module | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'modules/node/tests/node_test.module') diff --git a/modules/node/tests/node_test.module b/modules/node/tests/node_test.module index cfc503da0..c32bc1ec0 100644 --- a/modules/node/tests/node_test.module +++ b/modules/node/tests/node_test.module @@ -7,6 +7,22 @@ * the Node module. */ +/** + * Implements hook_node_load(). + */ +function node_test_node_load($nodes, $types) { + // Add properties to each loaded node which record the parameters that were + // passed in to this function, so the tests can check that (a) this hook was + // called, and (b) the parameters were what we expected them to be. + $nids = array_keys($nodes); + ksort($nids); + sort($types); + foreach ($nodes as $node) { + $node->node_test_loaded_nids = $nids; + $node->node_test_loaded_types = $types; + } +} + /** * Implements hook_node_view(). */ -- cgit v1.2.3