You are here

function DatabaseRegressionTestCase::testDBColumnExists in SimpleTest 7

Test the db_column_exists() function.

File

tests/database_test.test, line 2307

Class

DatabaseRegressionTestCase
Regression tests.

Code

function testDBColumnExists() {
  $this
    ->assertTrue(db_column_exists('node', 'nid'), t('Returns true for existent column.'));
  $this
    ->assertFalse(db_column_exists('node', 'nosuchcolumn'), t('Returns false for nonexistent column.'));
}