summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries <dries@buytaert.net>2012-01-24 20:18:44 -0500
committerDries <dries@buytaert.net>2012-01-24 20:18:44 -0500
commitb0ac4796a69d1640b0e6150cc2b02a6ae7e59cff (patch)
tree520d45139e1bffc6a8fccb4187b53b075f6c4e81 /modules
parentb7d049cae366a203b5410922abf3c33a53ed74d8 (diff)
downloadbrdo-b0ac4796a69d1640b0e6150cc2b02a6ae7e59cff.tar.gz
brdo-b0ac4796a69d1640b0e6150cc2b02a6ae7e59cff.tar.bz2
- Patch #1346166 by Dave Reid: Improve performance of token_replace() if there are no tokens to replace.
Diffstat (limited to 'modules')
-rw-r--r--modules/system/system.test3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/system/system.test b/modules/system/system.test
index 7f84d1751..ccb237d74 100644
--- a/modules/system/system.test
+++ b/modules/system/system.test
@@ -1861,6 +1861,9 @@ class TokenReplaceTestCase extends DrupalWebTestCase {
$generated = token_generate('node', $raw_tokens, array('node' => $node), array('sanitize' => FALSE));
$this->assertEqual($generated['[node:title]'], $node->title, t('Unsanitized token generated properly.'));
+
+ // Test token replacement when the string contains no tokens.
+ $this->assertEqual(token_replace('No tokens here.'), 'No tokens here.');
}
/**