Index: tests/token_test.info
===================================================================
RCS file: tests/token_test.info
diff -N tests/token_test.info
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/token_test.info	16 Nov 2010 02:27:11 -0000
@@ -0,0 +1,6 @@
+name = Token Test
+description = Testing module for token functionality.
+core = 7.x
+package = Testing
+hidden = TRUE
+files[] = token_test.module
Index: tests/token_test.module
===================================================================
RCS file: tests/token_test.module
diff -N tests/token_test.module
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/token_test.module	16 Nov 2010 02:27:11 -0000
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * Implements hook_exit().
+ */
+function token_test_exit() {
+  if ($debug = variable_get('token_page_tokens', array())) {
+    $debug += array('tokens' => array(), 'data' => array(), 'options' => array());
+    foreach (array_keys($debug['tokens']) as $token) {
+      $debug['values'][$token] = token_replace($token, $debug['data'], $debug['options']);
+    }
+    variable_set('token_page_tokens', $debug);
+  }
+}
