You are here

protected function FeaturesUserTestCase::_test_views_view in Features 7

Same name and namespace in other branches
  1. 7.2 tests/features.test \FeaturesUserTestCase::_test_views_view()

File

tests/features.test, line 144

Class

FeaturesUserTestCase
User permission component tests for Features

Code

protected function _test_views_view($op = 'load') {
  switch ($op) {
    case 'load':
      return views_get_view('features_test', TRUE);
    case 'override':
      $view = views_get_view('features_test', TRUE);
      $view
        ->set_display('default');
      $view->display_handler
        ->override_option('title', 'Foo bar');
      $view
        ->save();

      // Clear the load cache from above
      views_get_view('features_test', TRUE);
      break;
  }
}