function DatabaseExceptionWrapperTest::testPrepareStatementFailOnPreparation
Tests Connection::prepareStatement exceptions on preparation.
Core database drivers use PDO emulated statements or the StatementPrefetch class, which defer the statement check to the moment of the execution. In order to test a failure at preparation time, we have to force the connection not to emulate statement preparation. Still, this is only valid for the MySql driver.
File
-
core/
modules/ mysqli/ tests/ src/ Kernel/ mysqli/ DatabaseExceptionWrapperTest.php, line 25
Class
- DatabaseExceptionWrapperTest
- Tests exceptions thrown by queries.
Namespace
Drupal\Tests\mysqli\Kernel\mysqliCode
public function testPrepareStatementFailOnPreparation() : void {
$this->markTestSkipped('mysqli is not a pdo driver.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.