function DatabaseExceptionWrapperTest::testPrepareStatementFailOnPreparation
Same name in this branch
- 11.x core/modules/mysql/tests/src/Kernel/mysql/DatabaseExceptionWrapperTest.php \Drupal\Tests\mysql\Kernel\mysql\DatabaseExceptionWrapperTest::testPrepareStatementFailOnPreparation()
Same name and namespace in other branches
- 9 core/modules/mysql/tests/src/Kernel/mysql/DatabaseExceptionWrapperTest.php \Drupal\Tests\mysql\Kernel\mysql\DatabaseExceptionWrapperTest::testPrepareStatementFailOnPreparation()
- 10 core/modules/mysql/tests/src/Kernel/mysql/DatabaseExceptionWrapperTest.php \Drupal\Tests\mysql\Kernel\mysql\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.
Overrides DatabaseExceptionWrapperTest::testPrepareStatementFailOnPreparation
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.