Commit 1f0ac8aa authored by tim.plunkett's avatar tim.plunkett

Issue #1760764 by tim.plunkett: Remove usage of Standard profile in tests where possible.

parent 4ea00421
......@@ -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();
......
......@@ -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
}
}
......@@ -25,8 +25,6 @@
*/
abstract class FieldTestBase extends ViewTestBase {
protected $profile = 'standard';
/**
* Stores the field definitions used by the test.
* @var array
......
......@@ -14,8 +14,6 @@
*/
class ArgumentDefaultTest extends PluginTestBase {
protected $profile = 'standard';
/**
* A random string used in the default views.
*
......
......@@ -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'));
}
/**
......
......@@ -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',
......
......@@ -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',
......
......@@ -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();
......
......@@ -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(
......
......@@ -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'));
......
......@@ -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));
......
......@@ -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;
......
......@@ -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();
......
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