Enable views_ui by default, to help tests pass.
parent
b25e6302da
commit
763813d6d8
|
|
@ -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 @@
|
||||||
|
|
||||||
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 @@
|
||||||
|
|
||||||
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 @@
|
||||||
|
|
||||||
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 @@ class FilterDateTest extends ViewsSqlTest {
|
||||||
$this->map = array(
|
$this->map = array(
|
||||||
'nid' => 'nid',
|
'nid' => 'nid',
|
||||||
);
|
);
|
||||||
$this->enableViewsUi();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ class TranslatableTest extends ViewsSqlTest {
|
||||||
// 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 @@
|
||||||
|
|
||||||
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 @@
|
||||||
|
|
||||||
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 @@ abstract class ViewsSqlTest extends ViewsTestBase {
|
||||||
$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 {
|
||||||
*
|
*
|
||||||
* @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.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue