diff --git a/lib/Drupal/views/Tests/Comment/CommentTestBase.php b/lib/Drupal/views/Tests/Comment/CommentTestBase.php index 5ad7540c0112871854ebfc45b77e8469cc70b2d9..def2edfe5fce8e1391934a3780d426393e882a16 100644 --- a/lib/Drupal/views/Tests/Comment/CommentTestBase.php +++ b/lib/Drupal/views/Tests/Comment/CommentTestBase.php @@ -15,7 +15,12 @@ */ abstract class CommentTestBase extends ViewTestBase { - protected $profile = 'standard'; + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('comment'); function setUp() { parent::setUp(); diff --git a/lib/Drupal/views/Tests/Field/ApiDataTest.php b/lib/Drupal/views/Tests/Field/ApiDataTest.php index 681b3fd5f2b50390f881d1ca434c05b7d0c5b732..4a2a8474a5bf854b072941caa6e9cf4b4f4df35c 100644 --- a/lib/Drupal/views/Tests/Field/ApiDataTest.php +++ b/lib/Drupal/views/Tests/Field/ApiDataTest.php @@ -11,6 +11,7 @@ * Test the produced views_data. */ class ApiDataTest extends FieldTestBase { + /** * Stores the fields for this test case. */ @@ -29,7 +30,6 @@ function setUp() { $langcode = LANGUAGE_NOT_SPECIFIED; - $field_names = $this->setUpFields(); // The first one will be attached to nodes only. @@ -72,15 +72,6 @@ function setUp() { $this->nodes[] = $this->drupalCreateNode($edit); } - $permissions = array('access comments', 'access content', 'post comments', 'skip comment approval'); - for ($i = 0; $i < 5; $i++) { - $account = $this->drupalCreateUser($permissions); - $account->field_name_1 = array($langcode => array((array('value' => $this->randomName())))); - $account->field_name_2 = array($langcode => array((array('value' => $this->randomName())))); - $account->save(); - $this->users[] = $account; - } - // Reset views data cache. $cache = &drupal_static('_views_fetch_data' . '_cache'); $recursion_protection = &drupal_static('_views_fetch_data' . '_recursion_protected'); @@ -127,7 +118,6 @@ function testViewsData() { ); $this->assertEqual($expected_join, $data[$revision_table]['table']['join']['node_revision']); - // Check the table and the joins of the second field. // Attached to both node and user. $field_2 = $this->fields[2]; @@ -168,18 +158,6 @@ function testViewsData() { ) ); $this->assertEqual($expected_join, $data[$current_table_2]['table']['join']['users']); - - // Check the fields - // @todo - - // Check the arguments - // @todo - - // Check the sort criterias - // @todo - - // Check the relationships - // @todo - } + } diff --git a/lib/Drupal/views/Tests/Field/FieldTestBase.php b/lib/Drupal/views/Tests/Field/FieldTestBase.php index 113f4e903329cc8f0509ddfeea31560ae20b85c1..3a3cfe7eec94de6bb3ee042790dd70b2e710228b 100644 --- a/lib/Drupal/views/Tests/Field/FieldTestBase.php +++ b/lib/Drupal/views/Tests/Field/FieldTestBase.php @@ -25,8 +25,6 @@ */ abstract class FieldTestBase extends ViewTestBase { - protected $profile = 'standard'; - /** * Stores the field definitions used by the test. * @var array diff --git a/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php b/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php index 3da58a2b3f730167628fba975fb5b555dde88993..c0ced549a1332d8010d9ab37d649db0a3cb0493c 100644 --- a/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php +++ b/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php @@ -14,8 +14,6 @@ */ class ArgumentDefaultTest extends PluginTestBase { - protected $profile = 'standard'; - /** * 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 5e0d9c652edce4692376b4b5494c0ffbb8e9c879..bb571b94d28219362ee3a9d7ca394bcc8b083935 100644 --- a/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php +++ b/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php @@ -12,8 +12,6 @@ */ class ExposedFormTest extends PluginTestBase { - protected $profile = 'standard'; - public static function getInfo() { return array( 'name' => 'Exposed forms', @@ -26,6 +24,9 @@ protected function setUp() { parent::setUp(); $this->enableViewsTestModule(); + + $this->drupalCreateContentType(array('type' => 'article')); + $this->drupalCreateContentType(array('type' => 'page')); } /** diff --git a/lib/Drupal/views/Tests/QueryGroupByTest.php b/lib/Drupal/views/Tests/QueryGroupByTest.php index 82379106f0093e3f4df33acb015a66997f6e2c06..4ccfdbea6fb6e491d1e3f342e6b5b4a06f86cd00 100644 --- a/lib/Drupal/views/Tests/QueryGroupByTest.php +++ b/lib/Drupal/views/Tests/QueryGroupByTest.php @@ -14,13 +14,6 @@ */ class QueryGroupByTest extends ViewTestBase { - /** - * Modules to enable. - * - * @var array - */ - public static $modules = array('node'); - public static function getInfo() { return array( 'name' => 'Groupby', diff --git a/lib/Drupal/views/Tests/Taxonomy/RelationshipNodeTermDataTest.php b/lib/Drupal/views/Tests/Taxonomy/RelationshipNodeTermDataTest.php index e73e1470145db0fb8589b4dde5d1ab4885d7a2f8..fe927407f9b5f066eddb1ffd1ae81ac195869b7b 100644 --- a/lib/Drupal/views/Tests/Taxonomy/RelationshipNodeTermDataTest.php +++ b/lib/Drupal/views/Tests/Taxonomy/RelationshipNodeTermDataTest.php @@ -17,6 +17,13 @@ class RelationshipNodeTermDataTest extends ViewTestBase { protected $profile = 'standard'; + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('taxonomy'); + public static function getInfo() { return array( 'name' => 'Taxonomy: Node term data Relationship', diff --git a/lib/Drupal/views/Tests/UI/UITestBase.php b/lib/Drupal/views/Tests/UI/UITestBase.php index e422fe4a70c37404a7ab258fec498dc947bd09ce..aee199373d0ca0d292ca9bc586bbf9eedb52b330 100644 --- a/lib/Drupal/views/Tests/UI/UITestBase.php +++ b/lib/Drupal/views/Tests/UI/UITestBase.php @@ -14,7 +14,12 @@ */ abstract class UITestBase extends ViewTestBase { - protected $profile = 'standard'; + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('block'); protected function setUp() { parent::setUp(); diff --git a/lib/Drupal/views/Tests/ViewTest.php b/lib/Drupal/views/Tests/ViewTest.php index 026a021dff1126159c2fff7adfd82dbf2683b6d6..c0866626dc1a485525e1f66d15576d5479fae47e 100644 --- a/lib/Drupal/views/Tests/ViewTest.php +++ b/lib/Drupal/views/Tests/ViewTest.php @@ -19,7 +19,7 @@ class ViewTest extends ViewTestBase { * * @var array */ - public static $modules = array('node', 'comment'); + public static $modules = array('comment'); public static function getInfo() { return array( diff --git a/lib/Drupal/views/Tests/Wizard/BasicTest.php b/lib/Drupal/views/Tests/Wizard/BasicTest.php index 4fc9c9b24862d970cc1a472e093876248cc47d84..3460aa627e90b518ce4ebe40be7ec5310ef34736 100644 --- a/lib/Drupal/views/Tests/Wizard/BasicTest.php +++ b/lib/Drupal/views/Tests/Wizard/BasicTest.php @@ -21,6 +21,9 @@ public static function getInfo() { } function testViewsWizardAndListing() { + $this->drupalCreateContentType(array('type' => 'article')); + $this->drupalCreateContentType(array('type' => 'page')); + // Check if we can access the main views admin page. $this->drupalGet('admin/structure/views'); $this->assertText(t('Add new view')); diff --git a/lib/Drupal/views/Tests/Wizard/ItemsPerPageTest.php b/lib/Drupal/views/Tests/Wizard/ItemsPerPageTest.php index faa40e947ca62cab4ba8f1184cb0d8fc42a9b4ed..65d5a01651ca6d8d9b4a4e02e2ac62ce108852e3 100644 --- a/lib/Drupal/views/Tests/Wizard/ItemsPerPageTest.php +++ b/lib/Drupal/views/Tests/Wizard/ItemsPerPageTest.php @@ -24,6 +24,8 @@ public static function getInfo() { * Tests the number of items per page. */ function testItemsPerPage() { + $this->drupalCreateContentType(array('type' => 'article')); + // Create articles, each with a different creation time so that we can do a // meaningful sort. $node1 = $this->drupalCreateNode(array('type' => 'article', 'created' => REQUEST_TIME)); diff --git a/lib/Drupal/views/Tests/Wizard/TaggedWithTest.php b/lib/Drupal/views/Tests/Wizard/TaggedWithTest.php index 19eda9b9ca70c07b4ed4bf64d3e7f700ee965845..e09f0ed8c683fb172134026dc53544cfd483ed61 100644 --- a/lib/Drupal/views/Tests/Wizard/TaggedWithTest.php +++ b/lib/Drupal/views/Tests/Wizard/TaggedWithTest.php @@ -12,6 +12,13 @@ */ class TaggedWithTest extends WizardTestBase { + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('taxonomy'); + protected $node_type_with_tags; protected $node_type_without_tags; diff --git a/lib/Drupal/views/Tests/Wizard/WizardTestBase.php b/lib/Drupal/views/Tests/Wizard/WizardTestBase.php index e7803b20925fa690e36ce0ec9779f5e384feaee8..275286f1f6bb8a2a31c8be5bc9d1dd51f79c9135 100644 --- a/lib/Drupal/views/Tests/Wizard/WizardTestBase.php +++ b/lib/Drupal/views/Tests/Wizard/WizardTestBase.php @@ -14,7 +14,12 @@ */ abstract class WizardTestBase extends ViewTestBase { - protected $profile = 'standard'; + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('block'); function setUp() { parent::setUp();