diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-10-13 13:43:21 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-10-13 13:43:21 +0000 |
commit | 284f2b11a48b893cbd13d5429ad68d207488e4e6 (patch) | |
tree | 84b9bd1672ec7d9f585c2e4019d2f1f3b508afe1 /modules/menu/menu.test | |
parent | 3e6b9b5ea35dfb32e3c30a4d012f67c1d268a570 (diff) | |
download | brdo-284f2b11a48b893cbd13d5429ad68d207488e4e6.tar.gz brdo-284f2b11a48b893cbd13d5429ad68d207488e4e6.tar.bz2 |
- Patch #902644 by sun, tobiasb: machine names are too hard to implement. Date types and menu names are not validated.
This patch fixes a bug, but is also a last minute clean-up that will help with better distribution support. We discussed this in http://drupal.org/node/933846.
Diffstat (limited to 'modules/menu/menu.test')
-rw-r--r-- | modules/menu/menu.test | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/menu/menu.test b/modules/menu/menu.test index 2c5900181..a90fbfb28 100644 --- a/modules/menu/menu.test +++ b/modules/menu/menu.test @@ -140,7 +140,11 @@ class MenuTestCase extends DrupalWebTestCase { $this->drupalPost('admin/structure/menu/add', $edit, t('Save')); // Verify that using a menu_name that is too long results in a validation message. - $this->assertText(format_plural(MENU_MAX_MENU_NAME_LENGTH_UI, "The menu name can't be longer than 1 character.", "The menu name can't be longer than @count characters."), t('Validation failed when menu name is too long.')); + $this->assertRaw(t('!name cannot be longer than %max characters but is currently %length characters long.', array( + '!name' => t('Menu name'), + '%max' => MENU_MAX_MENU_NAME_LENGTH_UI, + '%length' => drupal_strlen($menu_name), + ))); // Change the menu_name so it no longer exceeds the maximum length. $menu_name = substr(hash('sha256', $this->randomName(16)), 0, MENU_MAX_MENU_NAME_LENGTH_UI); @@ -148,7 +152,11 @@ class MenuTestCase extends DrupalWebTestCase { $this->drupalPost('admin/structure/menu/add', $edit, t('Save')); // Verify that no validation error is given for menu_name length. - $this->assertNoText(format_plural(MENU_MAX_MENU_NAME_LENGTH_UI, "The menu name can't be longer than 1 character.", "The menu name can't be longer than @count characters."), t('Validation failed when menu name is too long.')); + $this->assertNoRaw(t('!name cannot be longer than %max characters but is currently %length characters long.', array( + '!name' => t('Menu name'), + '%max' => MENU_MAX_MENU_NAME_LENGTH_UI, + '%length' => drupal_strlen($menu_name), + ))); // Unlike most other modules, there is no confirmation message displayed. $this->drupalGet('admin/structure/menu'); |