Commit 763813d6 authored by tim.plunkett's avatar tim.plunkett
Browse files

Enable views_ui by default, to help tests pass.

parent b25e6302
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
namespace Drupal\views\Tests; namespace Drupal\views\Tests;
use Drupal\simpletest\WebTestBase;
use Drupal\views\View; use Drupal\views\View;
/** /**
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
namespace Drupal\views\Tests\Field; namespace Drupal\views\Tests\Field;
use Drupal\simpletest\WebTestBase;
/** /**
* Test the produced views_data. * Test the produced views_data.
*/ */
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
namespace Drupal\views\Tests\Field; namespace Drupal\views\Tests\Field;
use Drupal\simpletest\WebTestBase;
use Drupal\views\Tests\ViewsSqlTest; use Drupal\views\Tests\ViewsSqlTest;
/** /**
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
namespace Drupal\views\Tests\Field; namespace Drupal\views\Tests\Field;
use Drupal\simpletest\WebTestBase;
use Drupal\views\View; use Drupal\views\View;
/** /**
......
...@@ -34,7 +34,6 @@ function setUp() { ...@@ -34,7 +34,6 @@ function setUp() {
$this->map = array( $this->map = array(
'nid' => 'nid', 'nid' => 'nid',
); );
$this->enableViewsUi();
} }
/** /**
......
...@@ -30,7 +30,6 @@ public function setUp() { ...@@ -30,7 +30,6 @@ public function setUp() {
// Reset the plugin data. // Reset the plugin data.
views_fetch_plugin_data(NULL, NULL, TRUE); views_fetch_plugin_data(NULL, NULL, TRUE);
$this->strings = array('Master1', 'Apply1', 'Sort By1', 'Asc1', 'Desc1', 'more1', 'Reset1', 'Offset1', 'Master1', 'title1', 'Items per page1', 'fieldlabel1', 'filterlabel1'); $this->strings = array('Master1', 'Apply1', 'Sort By1', 'Asc1', 'Desc1', 'more1', 'Reset1', 'Offset1', 'Master1', 'title1', 'Items per page1', 'fieldlabel1', 'filterlabel1');
$this->enableViewsUi();
} }
/** /**
......
...@@ -7,12 +7,10 @@ ...@@ -7,12 +7,10 @@
namespace Drupal\views\Tests; namespace Drupal\views\Tests;
use Drupal\simpletest\WebTestBase;
/** /**
* Tests UI of aggregate functionality.. * Tests UI of aggregate functionality..
*/ */
class UiGroupByTest extends WebTestBase { class UiGroupByTest extends ViewsTestBase {
/** /**
* Modules to enable. * Modules to enable.
......
...@@ -7,12 +7,10 @@ ...@@ -7,12 +7,10 @@
namespace Drupal\views\Tests; namespace Drupal\views\Tests;
use Drupal\simpletest\WebTestBase;
/** /**
* Tests the various settings in the views ui. * Tests the various settings in the views ui.
*/ */
class UiSettingsTest extends WebTestBase { class UiSettingsTest extends ViewsTestBase {
/** /**
* Modules to enable. * Modules to enable.
......
...@@ -40,20 +40,6 @@ protected function setUp() { ...@@ -40,20 +40,6 @@ protected function setUp() {
$this->checkPermissions(array(), TRUE); $this->checkPermissions(array(), TRUE);
} }
/**
* This function allows to enable views ui from a higher class which can't change the setup function anymore.
*
* @TODO
* Convert existing setUp functions.
*/
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_router_rebuild();
}
/** /**
* The schema definition. * The schema definition.
*/ */
......
...@@ -18,7 +18,17 @@ abstract class ViewsTestBase extends WebTestBase { ...@@ -18,7 +18,17 @@ abstract class ViewsTestBase extends WebTestBase {
* *
* @var array * @var array
*/ */
public static $modules = array('views'); public static $modules = array('views', 'views_ui');
protected function setUp() {
parent::setUp();
// @todo Remove this hack or move it to child classes.
views_init();
views_module_include('views_default', TRUE);
views_get_all_views(TRUE);
menu_router_rebuild();
}
/** /**
* Helper function: verify a result set returned by view. * Helper function: verify a result set returned by view.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment