function FormsElementsVerticalTabsFunctionalTest::testJavaScriptOrdering
7.x form.test | FormsElementsVerticalTabsFunctionalTest::testJavaScriptOrdering() |
Ensures that vertical-tabs.js is included before collapse.js.
Otherwise, collapse.js adds "SHOW" or "HIDE" labels to the tabs.
File
- drupal-7.x/
modules/ simpletest/ tests/ form.test, line 1003 - Unit tests for the Drupal Form API.
Class
- FormsElementsVerticalTabsFunctionalTest
- Test the vertical_tabs form element for expected behavior.
Code
function testJavaScriptOrdering() {
$this->drupalGet('form_test/vertical-tabs');
$position1 = strpos($this->content, 'misc/vertical-tabs.js');
$position2 = strpos($this->content, 'misc/collapse.js');
$this->assertTrue($position1 !== FALSE && $position2 !== FALSE && $position1 < $position2, 'vertical-tabs.js is included before collapse.js');
}