Drupal 8  8.0.2
SelectTest Class Reference
Inheritance diagram for SelectTest:

Public Member Functions

 testSimpleSelect ()
 
 testSimpleComment ()
 
 testVulnerableComment ()
 
 makeCommentsProvider ()
 
 testSimpleSelectConditional ()
 
 testSimpleSelectExpression ()
 
 testSimpleSelectExpressionMultiple ()
 
 testSimpleSelectMultipleFields ()
 
 testSimpleSelectAllFields ()
 
 testNullCondition ()
 
 testIsNullCondition ()
 
 testIsNotNullCondition ()
 
 testUnion ()
 
 testUnionAll ()
 
 testUnionCount ()
 
 testRandomOrder ()
 
 testRegexCondition ()
 
 testSelectDuplicateAlias ()
 
 testInvalidSelectCount ()
 
 testEmptyInCondition ()
 
- Public Member Functions inherited from DatabaseTestBase
 ensureSampleDataNull ()
 

Additional Inherited Members

- Static Public Member Functions inherited from DatabaseTestBase
static addSampleData ()
 
- Static Public Attributes inherited from DatabaseTestBase
static $modules = array('database_test')
 
- Protected Member Functions inherited from DatabaseTestBase
 setUp ()
 

Detailed Description

Tests the Select query builder.

Database

Member Function Documentation

makeCommentsProvider ( )

Provides expected and input values for testVulnerableComment().

Referenced by SelectTest\testVulnerableComment().

Here is the caller graph for this function:

testEmptyInCondition ( )

Tests thrown exception for IN query conditions with an empty array.

References db_select().

Here is the call graph for this function:

testInvalidSelectCount ( )

Tests that an invalid merge query throws an exception.

References db_select().

Here is the call graph for this function:

testIsNotNullCondition ( )

Tests that we can find a record without a NULL value.

References db_select(), and DatabaseTestBase\ensureSampleDataNull().

Here is the call graph for this function:

testIsNullCondition ( )

Tests that we can find a record with a NULL value.

References db_select(), and DatabaseTestBase\ensureSampleDataNull().

Here is the call graph for this function:

testNullCondition ( )

Tests that a comparison with NULL is always FALSE.

References db_select(), and DatabaseTestBase\ensureSampleDataNull().

Here is the call graph for this function:

testRandomOrder ( )

Tests that random ordering of queries works.

We take the approach of testing the Drupal layer only, rather than trying to test that the database's random number generator actually produces random queries (which is very difficult to do without an unacceptable risk of the test failing by accident).

Therefore, in this test we simply run the same query twice and assert that the two results are reordered versions of each other (as well as of the same query without the random ordering). It is reasonable to assume that if we run the same select query twice and the results are in a different order each time, the only way this could happen is if we have successfully triggered the database's random ordering functionality.

References db_insert(), db_query(), and db_select().

Here is the call graph for this function:

testRegexCondition ( )

Tests that filter by a regular expression works as expected.

testSelectDuplicateAlias ( )

Tests that aliases are renamed when they are duplicates.

References db_select().

Here is the call graph for this function:

testSimpleComment ( )

Tests rudimentary SELECT statement with a COMMENT.

References db_select().

Here is the call graph for this function:

testSimpleSelect ( )

Tests rudimentary SELECT statements.

References db_select().

Here is the call graph for this function:

testSimpleSelectAllFields ( )

Tests adding all fields from a given table to a SELECT statement.

References db_select().

Here is the call graph for this function:

testSimpleSelectConditional ( )

Tests basic conditionals on SELECT statements.

References db_select().

Here is the call graph for this function:

testSimpleSelectExpression ( )

Tests SELECT statements with expressions.

References db_select().

Here is the call graph for this function:

testSimpleSelectExpressionMultiple ( )

Tests SELECT statements with multiple expressions.

References db_select().

Here is the call graph for this function:

testSimpleSelectMultipleFields ( )

Tests adding multiple fields to a SELECT statement at the same time.

References db_select().

Here is the call graph for this function:

testUnion ( )

Tests that we can UNION multiple Select queries together.

This is semantically equal to UNION DISTINCT, so we don't explicitly test that.

References db_select().

Here is the call graph for this function:

testUnionAll ( )

Tests that we can UNION ALL multiple SELECT queries together.

References db_select().

Here is the call graph for this function:

testUnionCount ( )

Tests that we can get a count query for a UNION Select query.

References db_select().

Here is the call graph for this function:

testVulnerableComment ( )

Tests query COMMENT system against vulnerabilities.

References db_select(), Database\getConnection(), and SelectTest\makeCommentsProvider().

Here is the call graph for this function:


The documentation for this class was generated from the following file: