From a3aa17e4caa615635de60e96c492efd7cfd991a5 Mon Sep 17 00:00:00 2001 From: "tim.plunkett" <tim.plunkett@241634.no-reply.drupal.org> Date: Sun, 2 Sep 2012 20:44:45 +0200 Subject: [PATCH] Issue #1768710 by tim.plunkett: Only enable Views UI in test classes that need it. --- lib/Drupal/views/Tests/AnalyzeTest.php | 7 +++++++ lib/Drupal/views/Tests/Handler/FilterDateTest.php | 7 +++++++ lib/Drupal/views/Tests/HandlersTest.php | 7 +++++++ lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php | 7 +++++++ lib/Drupal/views/Tests/Plugin/ExposedFormTest.php | 7 +++++++ lib/Drupal/views/Tests/Plugin/PagerTest.php | 7 +++++++ lib/Drupal/views/Tests/UI/UITestBase.php | 2 +- lib/Drupal/views/Tests/UpgradeTestCase.php | 2 +- lib/Drupal/views/Tests/ViewTestBase.php | 2 +- lib/Drupal/views/Tests/Wizard/WizardTestBase.php | 2 +- 10 files changed, 46 insertions(+), 4 deletions(-) diff --git a/lib/Drupal/views/Tests/AnalyzeTest.php b/lib/Drupal/views/Tests/AnalyzeTest.php index f7a21d2471f5..41c8844bf3ee 100644 --- a/lib/Drupal/views/Tests/AnalyzeTest.php +++ b/lib/Drupal/views/Tests/AnalyzeTest.php @@ -12,6 +12,13 @@ */ class AnalyzeTest extends ViewTestBase { + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('views_ui'); + public static function getInfo() { return array( 'name' => 'Views Analyze', diff --git a/lib/Drupal/views/Tests/Handler/FilterDateTest.php b/lib/Drupal/views/Tests/Handler/FilterDateTest.php index f4df461f680e..b5c1ea19623f 100644 --- a/lib/Drupal/views/Tests/Handler/FilterDateTest.php +++ b/lib/Drupal/views/Tests/Handler/FilterDateTest.php @@ -14,6 +14,13 @@ */ class FilterDateTest extends HandlerTestBase { + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('views_ui'); + public static function getInfo() { return array( 'name' => 'Filter: Date', diff --git a/lib/Drupal/views/Tests/HandlersTest.php b/lib/Drupal/views/Tests/HandlersTest.php index a4eb815a645a..c12981aee718 100644 --- a/lib/Drupal/views/Tests/HandlersTest.php +++ b/lib/Drupal/views/Tests/HandlersTest.php @@ -14,6 +14,13 @@ */ class HandlersTest extends ViewTestBase { + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('views_ui'); + public static function getInfo() { return array( 'name' => 'Handlers tests', diff --git a/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php b/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php index 7411412eacaa..a175407f895f 100644 --- a/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php +++ b/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php @@ -14,6 +14,13 @@ */ class ArgumentDefaultTest extends PluginTestBase { + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('views_ui'); + /** * A random string used in the default views. * diff --git a/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php b/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php index e52d5e6cb642..db14e69aea98 100644 --- a/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php +++ b/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php @@ -12,6 +12,13 @@ */ class ExposedFormTest extends PluginTestBase { + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('views_ui'); + public static function getInfo() { return array( 'name' => 'Exposed forms', diff --git a/lib/Drupal/views/Tests/Plugin/PagerTest.php b/lib/Drupal/views/Tests/Plugin/PagerTest.php index 053f6fa69c23..9e8602ace24a 100644 --- a/lib/Drupal/views/Tests/Plugin/PagerTest.php +++ b/lib/Drupal/views/Tests/Plugin/PagerTest.php @@ -14,6 +14,13 @@ */ class PagerTest extends PluginTestBase { + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('views_ui'); + public static function getInfo() { return array( 'name' => 'Pager', diff --git a/lib/Drupal/views/Tests/UI/UITestBase.php b/lib/Drupal/views/Tests/UI/UITestBase.php index aee199373d0c..eaf1d7d28feb 100644 --- a/lib/Drupal/views/Tests/UI/UITestBase.php +++ b/lib/Drupal/views/Tests/UI/UITestBase.php @@ -19,7 +19,7 @@ abstract class UITestBase extends ViewTestBase { * * @var array */ - public static $modules = array('block'); + public static $modules = array('views_ui', 'block'); protected function setUp() { parent::setUp(); diff --git a/lib/Drupal/views/Tests/UpgradeTestCase.php b/lib/Drupal/views/Tests/UpgradeTestCase.php index e21da9dd2b55..3ecb760b80f9 100644 --- a/lib/Drupal/views/Tests/UpgradeTestCase.php +++ b/lib/Drupal/views/Tests/UpgradeTestCase.php @@ -24,7 +24,7 @@ class UpgradeTestCase extends ViewTestBase { * * @var array */ - public static $modules = array('php'); + public static $modules = array('views_ui', 'php'); public static function getInfo() { return array( diff --git a/lib/Drupal/views/Tests/ViewTestBase.php b/lib/Drupal/views/Tests/ViewTestBase.php index 7ffdbeb8dc5c..caceaf1e902c 100644 --- a/lib/Drupal/views/Tests/ViewTestBase.php +++ b/lib/Drupal/views/Tests/ViewTestBase.php @@ -18,7 +18,7 @@ abstract class ViewTestBase extends WebTestBase { * * @var array */ - public static $modules = array('views', 'views_ui'); + public static $modules = array('views'); protected function setUp() { parent::setUp(); diff --git a/lib/Drupal/views/Tests/Wizard/WizardTestBase.php b/lib/Drupal/views/Tests/Wizard/WizardTestBase.php index 275286f1f6bb..acf02eb0d310 100644 --- a/lib/Drupal/views/Tests/Wizard/WizardTestBase.php +++ b/lib/Drupal/views/Tests/Wizard/WizardTestBase.php @@ -19,7 +19,7 @@ abstract class WizardTestBase extends ViewTestBase { * * @var array */ - public static $modules = array('block'); + public static $modules = array('views_ui', 'block'); function setUp() { parent::setUp(); -- GitLab