You are here

function DatabaseRegressionTestCase::testDBTableExists in Drupal 7

Test the db_table_exists() function.

File

modules/simpletest/tests/database_test.test, line 2940

Class

DatabaseRegressionTestCase
Regression tests.

Code

function testDBTableExists() {
  $this
    ->assertIdentical(TRUE, db_table_exists('node'), 'Returns true for existent table.');
  $this
    ->assertIdentical(FALSE, db_table_exists('nosuchtable'), 'Returns false for nonexistent table.');
}