diff --git a/lib/Drupal/views/Tests/AnalyzeTest.php b/lib/Drupal/views/Tests/AnalyzeTest.php index b86edbc166a1a54f4ee29c94056f12b31de3fc66..79763eb27b46152a96c67fd6a16aea5cc4f98f67 100644 --- a/lib/Drupal/views/Tests/AnalyzeTest.php +++ b/lib/Drupal/views/Tests/AnalyzeTest.php @@ -11,6 +11,7 @@ * Tests the views analyze system. */ class AnalyzeTest extends ViewsSqlTest { + public static function getInfo() { return array( 'name' => 'Views Analyze', @@ -20,7 +21,7 @@ public static function getInfo() { } public function setUp() { - parent::setUp('views_ui'); + parent::setUp(); // Add an admin user will full rights; $this->admin = $this->drupalCreateUser(array('administer views')); diff --git a/lib/Drupal/views/Tests/ArgumentDefaultTest.php b/lib/Drupal/views/Tests/ArgumentDefaultTest.php index 7d49d232d40b813f13bbaddef71b5df221f42bd2..0cdf880e560ab3c13d139a706787ecb77a8e6c91 100644 --- a/lib/Drupal/views/Tests/ArgumentDefaultTest.php +++ b/lib/Drupal/views/Tests/ArgumentDefaultTest.php @@ -13,6 +13,7 @@ * Basic test for pluggable argument default. */ class ArgumentDefaultTest extends ViewsSqlTest { + public static function getInfo() { return array( 'name' => 'Argument default', @@ -22,7 +23,7 @@ public static function getInfo() { } public function setUp() { - parent::setUp('views'); + parent::setUp(); $this->random = $this->randomString(); } @@ -31,7 +32,7 @@ public function setUp() { * Tests the use of a default argument plugin that provides no options. */ function testArgumentDefaultNoOptions() { - module_enable(array('views_ui', 'views_test')); + module_enable(array('views_test')); $admin_user = $this->drupalCreateUser(array('administer views', 'administer site configuration')); $this->drupalLogin($admin_user); diff --git a/lib/Drupal/views/Tests/ExposedFormTest.php b/lib/Drupal/views/Tests/ExposedFormTest.php index 3546da25a28d605646dfae67d41f2116e036459a..976af0b678e3911964cbf3152f35fb860e28a70e 100644 --- a/lib/Drupal/views/Tests/ExposedFormTest.php +++ b/lib/Drupal/views/Tests/ExposedFormTest.php @@ -11,6 +11,7 @@ * Tests exposed forms. */ class ExposedFormTest extends ViewsSqlTest { + public static function getInfo() { return array( 'name' => 'Exposed forms', @@ -20,8 +21,8 @@ public static function getInfo() { } public function setUp() { - parent::setUp('views_ui'); - module_enable(array('views_ui')); + parent::setUp(); + // @TODO Figure out why it's required to clear the cache here. views_module_include('views_default', TRUE); views_get_all_views(TRUE); diff --git a/lib/Drupal/views/Tests/GlossaryTest.php b/lib/Drupal/views/Tests/GlossaryTest.php index b915d8388f2da4e7ac0eb7f9a1136a1e79642bf5..35d2e710b63d4cde3f3502a195ab19fa26b70767 100644 --- a/lib/Drupal/views/Tests/GlossaryTest.php +++ b/lib/Drupal/views/Tests/GlossaryTest.php @@ -11,6 +11,7 @@ * Tests glossary view ( summary of arguments ). */ class GlossaryTest extends ViewsSqlTest { + public static function getInfo() { return array( 'name' => 'Glossary Test', @@ -19,10 +20,6 @@ public static function getInfo() { ); } - public function setUp() { - parent::setUp('views'); - } - /** * Tests the default glossary view. */ diff --git a/lib/Drupal/views/Tests/HandlersTest.php b/lib/Drupal/views/Tests/HandlersTest.php index cae4efdd82f913893a4660922680c54d57042c83..19605cf83bda15a68abed22bad5e10d8a22b7b99 100644 --- a/lib/Drupal/views/Tests/HandlersTest.php +++ b/lib/Drupal/views/Tests/HandlersTest.php @@ -11,6 +11,7 @@ * Tests abstract handlers of views. */ class HandlersTest extends ViewsSqlTest { + public static function getInfo() { return array( 'name' => 'Handlers test', @@ -19,11 +20,6 @@ public static function getInfo() { ); } - protected function setUp() { - parent::setUp('views', 'views_ui'); - module_enable(array('views_ui')); - } - function testFilterInOperatorUi() { $admin_user = $this->drupalCreateUser(array('administer views', 'administer site configuration')); $this->drupalLogin($admin_user); diff --git a/lib/Drupal/views/Tests/PagerTest.php b/lib/Drupal/views/Tests/PagerTest.php index 196743816189aabfafb4c49ffb06533e720c9289..f3379a9a849040acc51cf05bd82c206376528cb9 100644 --- a/lib/Drupal/views/Tests/PagerTest.php +++ b/lib/Drupal/views/Tests/PagerTest.php @@ -13,6 +13,7 @@ * Tests the pluggable pager system. */ class PagerTest extends ViewsSqlTest { + public static function getInfo() { return array( 'name' => 'Pager', @@ -21,10 +22,6 @@ public static function getInfo() { ); } - public function setUp() { - parent::setUp('views', 'views_ui', 'views_test'); - } - /** * Pagers was sometimes not stored. * diff --git a/lib/Drupal/views/Tests/UiGroupByTest.php b/lib/Drupal/views/Tests/UiGroupByTest.php index 15768de1e041c5d1a148dee2763befb208742a70..06418781d762ca29c568c2063638c0494f285cd7 100644 --- a/lib/Drupal/views/Tests/UiGroupByTest.php +++ b/lib/Drupal/views/Tests/UiGroupByTest.php @@ -13,11 +13,18 @@ * Tests UI of aggregate functionality.. */ class UiGroupByTest extends WebTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('views_ui', 'views_test'); + protected $profile = 'standard'; function setUp() { - // Enable views_ui. - parent::setUp('views_ui', 'views_test'); + parent::setUp(); // Create and log in a user with administer views permission. $views_admin = $this->drupalCreateUser(array('administer views', 'administer blocks', 'bypass node access', 'access user profiles', 'view revisions')); diff --git a/lib/Drupal/views/Tests/UiSettingsTest.php b/lib/Drupal/views/Tests/UiSettingsTest.php index 614e3d357131ec4f5f44ae7e295d281b794a56e8..2f36be30afd20d761b8cc25688ff07acd416064d 100644 --- a/lib/Drupal/views/Tests/UiSettingsTest.php +++ b/lib/Drupal/views/Tests/UiSettingsTest.php @@ -14,6 +14,13 @@ */ class UiSettingsTest extends WebTestBase { + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('views_ui'); + /** * Stores an admin user used by the different tests. * @@ -30,7 +37,8 @@ public static function getInfo() { } protected function setUp() { - parent::setUp('views', 'views_ui'); + parent::setUp(); + $this->adminUser = $this->drupalCreateUser(array('administer views')); } diff --git a/lib/Drupal/views/Tests/UpgradeTestCase.php b/lib/Drupal/views/Tests/UpgradeTestCase.php index e109d2288af2e12369cbee55470157edf7ae4f6d..d0e38ec5f65a9a3a02fe5ec6518e471d172ab9dc 100644 --- a/lib/Drupal/views/Tests/UpgradeTestCase.php +++ b/lib/Drupal/views/Tests/UpgradeTestCase.php @@ -15,6 +15,17 @@ * You can find all conversions by searching for "moved to". */ class UpgradeTestCase extends ViewsSqlTest { + + /** + * Modules to enable. + * + * To import a view the user needs use PHP for settings rights, so enable php + * module. + * + * @var array + */ + public static $modules = array('php'); + public static function getInfo() { return array( 'name' => 'Views Upgrade test', @@ -24,10 +35,7 @@ public static function getInfo() { } protected function setUp() { -// // To import a view the user needs use PHP for settings rights, so enable php module. parent::setUp(); - - module_enable(array('php')); $this->resetAll(); } diff --git a/lib/Drupal/views/Tests/User/UserArgumentValidate.php b/lib/Drupal/views/Tests/User/UserArgumentValidate.php index 06c71e26fac8b011f67f7008eca9090c694bfd27..d6e776d225585098e9f5b84fc0a0df10bfc8ac3f 100644 --- a/lib/Drupal/views/Tests/User/UserArgumentValidate.php +++ b/lib/Drupal/views/Tests/User/UserArgumentValidate.php @@ -14,6 +14,7 @@ * Tests views user argument argument handler. */ class UserArgumentValidate extends ViewsSqlTest { + public static function getInfo() { return array( 'name' => 'Tests user argument validator', @@ -23,7 +24,8 @@ public static function getInfo() { } function setUp() { - parent::setUp('views'); + parent::setUp(); + $this->account = $this->drupalCreateUser(); } diff --git a/lib/Drupal/views/Tests/ViewsSqlTest.php b/lib/Drupal/views/Tests/ViewsSqlTest.php index 69372901291f1fbc7b4ca6234cd91009f6f94625..bff82ccc9ba595d6a810f5ca8b78216866e31a79 100644 --- a/lib/Drupal/views/Tests/ViewsSqlTest.php +++ b/lib/Drupal/views/Tests/ViewsSqlTest.php @@ -9,8 +9,15 @@ abstract class ViewsSqlTest extends ViewsTestBase { + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('views_ui'); + protected function setUp() { - parent::setUp('views', 'views_ui'); + parent::setUp(); // Define the schema and views data variable before enabling the test module. variable_set('views_test_schema', $this->schemaDefinition()); diff --git a/lib/Drupal/views/Tests/ViewsTestBase.php b/lib/Drupal/views/Tests/ViewsTestBase.php index d6f021a0adde6bc63d6a9ed3da09e80adcde8774..443ffa1ca58227d06f76656d46eda30a7f2a7d5a 100644 --- a/lib/Drupal/views/Tests/ViewsTestBase.php +++ b/lib/Drupal/views/Tests/ViewsTestBase.php @@ -12,6 +12,14 @@ * Abstract class for views testing. */ abstract class ViewsTestBase extends WebTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('views'); + /** * Helper function: verify a result set returned by view. * diff --git a/lib/Drupal/views/Tests/WizardTestBase.php b/lib/Drupal/views/Tests/WizardTestBase.php index 5f046e3550cc2151f75aaa297551ee23b6a63c7d..6623101a2ff7127a4c8ddc1ec1c1f481f9bd9b33 100644 --- a/lib/Drupal/views/Tests/WizardTestBase.php +++ b/lib/Drupal/views/Tests/WizardTestBase.php @@ -11,11 +11,11 @@ * Views UI wizard tests. */ abstract class WizardTestBase extends ViewsSqlTest { + protected $profile = 'standard'; function setUp() { - // Enable views_ui. - parent::setUp('views_ui'); + parent::setUp(); // Create and log in a user with administer views permission. $views_admin = $this->drupalCreateUser(array('administer views', 'administer blocks', 'bypass node access', 'access user profiles', 'view revisions'));