function RegressionTest::testDBTableExists
Tests the Schema::tableExists() method.
File
- 
              core/
tests/ Drupal/ KernelTests/ Core/ Database/ RegressionTest.php, line 40  
Class
- RegressionTest
 - Regression tests cases for the database layer.
 
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function testDBTableExists() {
  $this->assertTrue($this->connection
    ->schema()
    ->tableExists('test'), 'Returns true for existent table.');
  $this->assertFalse($this->connection
    ->schema()
    ->tableExists('no_such_table'), 'Returns false for nonexistent table.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.