Drupal 8  8.0.2
DeleteTruncateTest Class Reference
Inheritance diagram for DeleteTruncateTest:

Public Member Functions

 testSubselectDelete ()
 
 testSimpleDelete ()
 
 testTruncate ()
 
 testSpecialColumnDelete ()
 
- 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 delete and truncate queries.

The DELETE tests are not as extensive, as all of the interesting code for DELETE queries is in the conditional which is identical to the UPDATE and SELECT conditional handling.

The TRUNCATE tests are not extensive either, because the behavior of TRUNCATE queries is not consistent across database engines. We only test that a TRUNCATE query actually deletes all rows from the target table.

Database

Member Function Documentation

testSimpleDelete ( )

Confirms that we can delete a single record successfully.

References db_delete(), and db_query().

Here is the call graph for this function:

testSpecialColumnDelete ( )

Confirms that we can delete a single special column name record successfully.

References db_delete(), and db_query().

Here is the call graph for this function:

testSubselectDelete ( )

Confirms that we can use a subselect in a delete successfully.

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

Here is the call graph for this function:

testTruncate ( )

Confirms that we can truncate a whole table successfully.

References db_query(), and db_truncate().

Here is the call graph for this function:


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