You are here

function ViewsSqlTest::enableViewsUi in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 tests/views_query.test \ViewsSqlTest::enableViewsUi()

This function allows to enable views ui from a higher class which can't change the setup function anymore.

@todo Convert existing setUp functions.

2 calls to ViewsSqlTest::enableViewsUi()
ViewsHandlerFilterDateTest::setUp in tests/handlers/views_handler_filter_date.test
Sets up a Drupal site for running functional and integration tests.
ViewsTranslatableTest::setUp in tests/views_translatable.test
Sets up a Drupal site for running functional and integration tests.

File

tests/views_query.test, line 230
Abstract class for views testing.

Class

ViewsSqlTest

Code

function enableViewsUi() {
  module_enable(array(
    'views_ui',
  ));

  // @todo Figure out why it's required to clear the cache here.
  views_module_include('views_default', TRUE);
  views_get_all_views(TRUE);
  menu_rebuild();
}