You are here

function RegressionTest::testDBTableExists in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Database/RegressionTest.php \Drupal\system\Tests\Database\RegressionTest::testDBTableExists()

Tests the db_table_exists() function.

File

core/modules/system/src/Tests/Database/RegressionTest.php, line 44
Contains \Drupal\system\Tests\Database\RegressionTest.

Class

RegressionTest
Regression tests cases for the database layer.

Namespace

Drupal\system\Tests\Database

Code

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