function DeleteTruncateTest::testDeleteFromNonExistingTable
Same name in other branches
- 10 core/tests/Drupal/KernelTests/Core/Database/DeleteTruncateTest.php \Drupal\KernelTests\Core\Database\DeleteTruncateTest::testDeleteFromNonExistingTable()
- 11.x core/tests/Drupal/KernelTests/Core/Database/DeleteTruncateTest.php \Drupal\KernelTests\Core\Database\DeleteTruncateTest::testDeleteFromNonExistingTable()
Deleting from a not existing table throws a DatabaseExceptionWrapper.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Database/ DeleteTruncateTest.php, line 157
Class
- DeleteTruncateTest
- Tests delete and truncate queries.
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function testDeleteFromNonExistingTable() : void {
$this->expectException(DatabaseExceptionWrapper::class);
$this->connection
->delete('a-table-that-does-not-exist')
->execute();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.