function DatabaseLegacyTest::testDbEscapeTable
Tests deprecation of the db_escape_table() function.
@expectedDeprecation db_escape_table() is deprecated in drupal:8.0.0. It will be removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call escapeTable() on it. For example, $injected_database->escapeTable($table). See https://www.drupal.org/node/2993033
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Database/ DatabaseLegacyTest.php, line 338
Class
- DatabaseLegacyTest
- Deprecation tests cases for the database layer.
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function testDbEscapeTable() {
$this->assertNotNull(db_escape_table('test'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.