diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-13 03:05:54 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-13 03:05:54 +0000 |
commit | a3018c01a2b0f43c90c989ffcba1194c6614f243 (patch) | |
tree | 32ebe450ecf7b7af6df1f3bb73d0980d17686635 /modules | |
parent | 49699d5be129c467323fd469573df3fbf6dbc98e (diff) | |
download | brdo-a3018c01a2b0f43c90c989ffcba1194c6614f243.tar.gz brdo-a3018c01a2b0f43c90c989ffcba1194c6614f243.tar.bz2 |
#167112 by evil_marty and deekayen: Add support for 'wildcard' .tpl.php files to act on any numeric pages, such as page-user-%.tpl.php
Diffstat (limited to 'modules')
-rw-r--r-- | modules/simpletest/tests/theme.test | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/simpletest/tests/theme.test b/modules/simpletest/tests/theme.test index 6a79e4b4c..805d85510 100644 --- a/modules/simpletest/tests/theme.test +++ b/modules/simpletest/tests/theme.test @@ -27,17 +27,17 @@ class TemplateUnitTest extends DrupalWebTestCase { variable_set('site_frontpage', 'nobody-home'); $args = array('node', '1', 'edit'); $suggestions = template_page_suggestions($args); - $this->assertEqual($suggestions, array('page-node', 'page-node-1', 'page-node-edit'), t('Found expected node edit page template suggestions')); + $this->assertEqual($suggestions, array('page-node', 'page-node-%', 'page-node-1', 'page-node-edit'), t('Found expected node edit page template suggestions')); // Check attack vectors. $args = array('node', '\\1'); $suggestions = template_page_suggestions($args); - $this->assertEqual($suggestions, array('page-node', 'page-node-1'), t('Removed invalid \\ from template suggestions')); + $this->assertEqual($suggestions, array('page-node', 'page-node-%', 'page-node-1'), t('Removed invalid \\ from template suggestions')); $args = array('node', '1/'); $suggestions = template_page_suggestions($args); - $this->assertEqual($suggestions, array('page-node', 'page-node-1'), t('Removed invalid / from template suggestions')); + $this->assertEqual($suggestions, array('page-node', 'page-node-%', 'page-node-1'), t('Removed invalid / from template suggestions')); $args = array('node', "1\0"); $suggestions = template_page_suggestions($args); - $this->assertEqual($suggestions, array('page-node', 'page-node-1'), t('Removed invalid \\0 from template suggestions')); + $this->assertEqual($suggestions, array('page-node', 'page-node-%', 'page-node-1'), t('Removed invalid \\0 from template suggestions')); // Tests for drupal_discover_template() $suggestions = array('page'); $this->assertEqual(drupal_discover_template(array('themes/garland'), $suggestions), 'themes/garland/page.tpl.php', t('Safe template discovered')); |