public function BEF_TestCase::testsimpletest_befPageDisplayRadiosFieldset in Better Exposed Filters 7
Same name and namespace in other branches
- 8.3 tests/better_exposed_filters.test \BEF_TestCase::testsimpletest_befPageDisplayRadiosFieldset()
- 6.3 tests/better_exposed_filters.test \BEF_TestCase::testsimpletest_befPageDisplayRadiosFieldset()
- 6 tests/better_exposed_filters.test \BEF_TestCase::testsimpletest_befPageDisplayRadiosFieldset()
- 6.2 tests/better_exposed_filters.test \BEF_TestCase::testsimpletest_befPageDisplayRadiosFieldset()
Verify BEF radio buttons are rendered correctly in a fieldset (collapsible == TRUE)
File
- tests/
better_exposed_filters.test, line 132 - Tests for the Better Exposed Filters module @author mikeker
Class
- BEF_TestCase
- Functional test for Better Exposed Filters
Code
public function testsimpletest_befPageDisplayRadiosFieldset() {
$bef_settings = array(
'bef_format' => 'bef',
'bef_filter_description' => $this
->randomName(16),
'bef_select_all_none' => TRUE,
'bef_collapsible' => TRUE,
);
$this
->_befExposedFilterSettings('status', $bef_settings);
// Add a page view to the default view
$settings = array(
'path' => array(
'path' => $this
->randomName(8),
),
);
$this
->_befCreateDisplay('page', $settings);
$this
->_befSaveView();
$this
->drupalGet($settings['path']['path']);
$this
->assertText(t('Published'), 'Verify exposed filter label', 'Better Exposed Filters');
$this
->assertFieldByXpath('//fieldset//input[@name="status" and @type="radio"]', NULL, 'Radio buttons are enclosed by a fieldset', 'Better Exposed Filters');
$this
->assertFieldByXpath('//fieldset/legend', t('Published'), 'Filter label is used as the fieldset legend', 'Better Exposed Filters');
}