function ViewsSqlTest::enableViewsUi

Same name in other branches
  1. 7.x-3.x 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.

File

tests/views_query.test, line 120

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.inc', TRUE);
    views_get_all_views(TRUE);
    menu_rebuild();
}