You are here

public function WebformViewsSelectViewEnabledTestCase::testDisabledView in Webform Views Select 7

Test that a disabled view is not listed as an options source.

File

tests/webform_views_select.test, line 35
Contains WebformViewsSelectViewEnabledTestCase.

Class

WebformViewsSelectViewEnabledTestCase
Test that a view only appears in the webform select list if it is enabled.

Code

public function testDisabledView() {

  // Disable the view:
  $view = views_get_view('webform_views_select_test_view');
  ctools_export_crud_disable('views_view', $view);

  // Clear cache:
  ctools_export_load_object_reset('views_view');
  $items = webform_views_select_webform_select_options_info();
  $this
    ->assertFalse(isset($items['webform_views_select_test_view-webform_select_1']), 'Disabled view is not listed in the select options info.');
}