diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2012-10-16 10:44:01 -0700 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2012-10-16 10:44:01 -0700 |
commit | b96d440d8a862723b40661a4fe2da0573bef92ba (patch) | |
tree | ad53e230cec25300d566788f5a1743778724f6d7 /modules/simpletest | |
parent | a5d723152b00a04cc915f3495671a9c7cb2ebca3 (diff) | |
download | brdo-b96d440d8a862723b40661a4fe2da0573bef92ba.tar.gz brdo-b96d440d8a862723b40661a4fe2da0573bef92ba.tar.bz2 |
Revert "Issue #1742438 by larowlan, Christian Biggins, kim.pepper, dcam, Everett Zufelt, mgifford: Fixed Vertical tabs header and container rendered even when no vertical tabs."
Concerns raised in http://drupal.org/node/1742438#comment-6609888 that this breaks backwards compatibility.
This reverts commit d462cafd50d5f7cbaab61f2cd271e3a5bc1df718.
Diffstat (limited to 'modules/simpletest')
-rw-r--r-- | modules/simpletest/tests/form.test | 20 | ||||
-rw-r--r-- | modules/simpletest/tests/form_test.module | 14 |
2 files changed, 0 insertions, 34 deletions
diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test index 08d2fcacc..675e8d189 100644 --- a/modules/simpletest/tests/form.test +++ b/modules/simpletest/tests/form.test @@ -930,10 +930,6 @@ class FormsElementsVerticalTabsFunctionalTest extends DrupalWebTestCase { function setUp() { parent::setUp('form_test'); - - $this->admin_user = $this->drupalCreateUser(array('access vertical_tab_test tabs')); - $this->web_user = $this->drupalCreateUser(); - $this->drupalLogin($this->admin_user); } /** @@ -947,22 +943,6 @@ class FormsElementsVerticalTabsFunctionalTest extends DrupalWebTestCase { $position2 = strpos($this->content, 'misc/collapse.js'); $this->assertTrue($position1 !== FALSE && $position2 !== FALSE && $position1 < $position2, t('vertical-tabs.js is included before collapse.js')); } - - /** - * Ensures that vertical tab markup is not shown if user has no tab access. - */ - function testWrapperNotShownWhenEmpty() { - // Test admin user can see vertical tabs and wrapper. - $this->drupalGet('form_test/vertical-tabs'); - $wrapper = $this->xpath("//div[@class='vertical-tabs-panes']"); - $this->assertTrue(isset($wrapper[0]), 'Vertical tab panes found.'); - - // Test wrapper markup not present for non-privileged web user. - $this->drupalLogin($this->web_user); - $this->drupalGet('form_test/vertical-tabs'); - $wrapper = $this->xpath("//div[@class='vertical-tabs-panes']"); - $this->assertFalse(isset($wrapper[0]), 'Vertical tab wrappers are not displayed to unprivileged users.'); - } } /** diff --git a/modules/simpletest/tests/form_test.module b/modules/simpletest/tests/form_test.module index 5dd1ce7a7..5d6527680 100644 --- a/modules/simpletest/tests/form_test.module +++ b/modules/simpletest/tests/form_test.module @@ -223,18 +223,6 @@ function form_test_menu() { } /** - * Implements hook_permission(). - */ -function form_test_permission() { - $perms = array( - 'access vertical_tab_test tabs' => array( - 'title' => t('Access vertical_tab_test tabs'), - ), - ); - return $perms; -} - -/** * Form submit handler to return form values as JSON. */ function _form_test_submit_values_json($form, &$form_state) { @@ -643,7 +631,6 @@ function _form_test_vertical_tabs_form($form, &$form_state) { '#title' => t('Tab 1'), '#collapsible' => TRUE, '#group' => 'vertical_tabs', - '#access' => user_access('access vertical_tab_test tabs') ); $form['tab1']['field1'] = array( '#title' => t('Field 1'), @@ -654,7 +641,6 @@ function _form_test_vertical_tabs_form($form, &$form_state) { '#title' => t('Tab 2'), '#collapsible' => TRUE, '#group' => 'vertical_tabs', - '#access' => user_access('access vertical_tab_test tabs') ); $form['tab2']['field2'] = array( '#title' => t('Field 2'), |