function ConnectionTest::testMultipleStatementsQuery
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php \Drupal\KernelTests\Core\Database\ConnectionTest::testMultipleStatementsQuery()
- 10 core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php \Drupal\KernelTests\Core\Database\ConnectionTest::testMultipleStatementsQuery()
Ensure that you cannot execute multiple statements in a query.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Database/ ConnectionTest.php, line 151
Class
- ConnectionTest
- Tests of the core database system.
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function testMultipleStatementsQuery() : void {
$this->expectException(\InvalidArgumentException::class);
Database::getConnection('default', 'default')->query('SELECT * FROM {test}; SELECT * FROM {test_people}');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.