Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
1f0ac8aa
Commit
1f0ac8aa
authored
Aug 28, 2012
by
tim.plunkett
Browse files
Issue
#1760764
by tim.plunkett: Remove usage of Standard profile in tests where possible.
parent
4ea00421
Changes
13
Hide whitespace changes
Inline
Side-by-side
lib/Drupal/views/Tests/Comment/CommentTestBase.php
View file @
1f0ac8aa
...
...
@@ -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
();
...
...
lib/Drupal/views/Tests/Field/ApiDataTest.php
View file @
1f0ac8aa
...
...
@@ -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
}
}
lib/Drupal/views/Tests/Field/FieldTestBase.php
View file @
1f0ac8aa
...
...
@@ -25,8 +25,6 @@
*/
abstract
class
FieldTestBase
extends
ViewTestBase
{
protected
$profile
=
'standard'
;
/**
* Stores the field definitions used by the test.
* @var array
...
...
lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php
View file @
1f0ac8aa
...
...
@@ -14,8 +14,6 @@
*/
class
ArgumentDefaultTest
extends
PluginTestBase
{
protected
$profile
=
'standard'
;
/**
* A random string used in the default views.
*
...
...
lib/Drupal/views/Tests/Plugin/ExposedFormTest.php
View file @
1f0ac8aa
...
...
@@ -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'
));
}
/**
...
...
lib/Drupal/views/Tests/QueryGroupByTest.php
View file @
1f0ac8aa
...
...
@@ -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'
,
...
...
lib/Drupal/views/Tests/Taxonomy/RelationshipNodeTermDataTest.php
View file @
1f0ac8aa
...
...
@@ -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'
,
...
...
lib/Drupal/views/Tests/UI/UITestBase.php
View file @
1f0ac8aa
...
...
@@ -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
();
...
...
lib/Drupal/views/Tests/ViewTest.php
View file @
1f0ac8aa
...
...
@@ -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
(
...
...
lib/Drupal/views/Tests/Wizard/BasicTest.php
View file @
1f0ac8aa
...
...
@@ -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'
));
...
...
lib/Drupal/views/Tests/Wizard/ItemsPerPageTest.php
View file @
1f0ac8aa
...
...
@@ -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
));
...
...
lib/Drupal/views/Tests/Wizard/TaggedWithTest.php
View file @
1f0ac8aa
...
...
@@ -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
;
...
...
lib/Drupal/views/Tests/Wizard/WizardTestBase.php
View file @
1f0ac8aa
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment