public function DatabaseLegacyTest::testDbSelect in Drupal 8
Tests the db_select() function.
@expectedDeprecation db_select() 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 select() on it. For example, $injected_database->db_select($table, $alias, $options). See https://www.drupal.org/node/2993033
File
- core/
tests/ Drupal/ KernelTests/ Core/ Database/ DatabaseLegacyTest.php, line 520
Class
- DatabaseLegacyTest
- Deprecation tests cases for the database layer.
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function testDbSelect() {
$this
->assertInstanceOf(Select::class, db_select('test'));
}