diff options
Diffstat (limited to 'modules/simpletest/tests/form.test')
-rw-r--r-- | modules/simpletest/tests/form.test | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test index b51c116d0..9dfa7cf8c 100644 --- a/modules/simpletest/tests/form.test +++ b/modules/simpletest/tests/form.test @@ -315,3 +315,32 @@ class FormsElementsTableSelectFunctionalTest extends DrupalWebTestCase { } +/** + * Test the form_clean_id() for expected behavior. + */ +class FormsFormCleanIdFunctionalTest extends DrupalWebTestCase { + + function getInfo() { + return array( + 'name' => t('form_clean_id() test'), + 'description' => t('Test the function form_clean_id() for expected behavior'), + 'group' => t('Form API'), + ); + } + + function setUp() { + parent::setUp('form_test'); + } + + /** + * Test the uniqueness of the form_clean_id() function. + */ + function testFormCleanId() { + $this->drupalGet('form_test/form_clean_id'); + $this->assertNoUniqueText('form-test-form-clean-id-presence'); + $this->assertUniqueText('form-test-form-clean-id-presence-1'); + $this->assertUniqueText('form-test-form-clean-id-presence-2'); + $this->assertNoUniqueText('Test Textfield'); + } + +} |