You are here

protected function BEF_TestBase::setBefExposedForm in Better Exposed Filters 7.3

Ensures that BEF is selected as the exposed form option.

Note: This routine expects the caller to save the view, as needed.

1 call to BEF_TestBase::setBefExposedForm()
BEF_TestBase::setUp in tests/better_exposed_filters_TestBase.php
Sets up a Drupal site for running functional and integration tests.

File

tests/better_exposed_filters_TestBase.php, line 246
Base class for testing the Better Exposed Filters module. @author mikeker

Class

BEF_TestBase
Helper functions for Better Exposed Filters tests.

Code

protected function setBefExposedForm($display = 'default') {
  $edit = array(
    "exposed_form[type]" => 'better_exposed_filters',
  );
  $url = 'admin/structure/views/nojs/display/' . $this->view['machine_name'] . "/{$display}/exposed_form";
  $this
    ->drupalPost($url, $edit, 'Apply');

  // BEF settings is covered under setBefSettings() so we just accept the
  // default values and move on.
  $this
    ->drupalPost(NULL, array(), 'Apply');
}