public function ConnectionTest::testMultipleStatements in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php \Drupal\KernelTests\Core\Database\ConnectionTest::testMultipleStatements()
- 10 core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php \Drupal\KernelTests\Core\Database\ConnectionTest::testMultipleStatements()
Ensure that you cannot prepare multiple statements.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Database/ ConnectionTest.php, line 231
Class
- ConnectionTest
- Tests of the core database system.
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function testMultipleStatements() {
$this
->expectException(\InvalidArgumentException::class);
Database::getConnection('default', 'default')
->prepareStatement('SELECT * FROM {test}; SELECT * FROM {test_people}', []);
}