We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fcef27 commit c07666dCopy full SHA for c07666d
1 file changed
tests/DatabaseTest.php
@@ -346,6 +346,19 @@ public function testPrepare() : void
346
PreparedStatement::class,
347
static::$database->prepare('SELECT * FROM `t1` WHERE `c1` = ?')
348
);
349
+ $this->expectException(\mysqli_sql_exception::class);
350
+ static::$database->prepare('FOO');
351
+ }
352
+
353
+ /**
354
+ * @runInSeparateProcess
355
+ */
356
+ public function testPrepareRuntimeException() : void
357
+ {
358
+ \mysqli_report(\MYSQLI_REPORT_OFF);
359
+ $this->expectException(\RuntimeException::class);
360
+ $this->expectExceptionMessage('Prepared statement failed: FOO');
361
362
}
363
364
public function testInsertId() : void
0 commit comments