mirror of
https://github.com/dg/dibi.git
synced 2025-08-26 15:34:22 +02:00
coding style
This commit is contained in:
@@ -19,17 +19,22 @@ function buildPdoDriver(?int $errorMode)
|
||||
|
||||
|
||||
// PDO error mode: exception
|
||||
Assert::exception(function () {
|
||||
buildPdoDriver(PDO::ERRMODE_EXCEPTION);
|
||||
}, Dibi\DriverException::class, 'PDO connection in exception or warning error mode is not supported.');
|
||||
Assert::exception(
|
||||
fn() => buildPdoDriver(PDO::ERRMODE_EXCEPTION),
|
||||
Dibi\DriverException::class,
|
||||
'PDO connection in exception or warning error mode is not supported.',
|
||||
);
|
||||
|
||||
|
||||
// PDO error mode: warning
|
||||
Assert::exception(function () {
|
||||
buildPdoDriver(PDO::ERRMODE_WARNING);
|
||||
}, Dibi\DriverException::class, 'PDO connection in exception or warning error mode is not supported.');
|
||||
Assert::exception(
|
||||
fn() => buildPdoDriver(PDO::ERRMODE_WARNING),
|
||||
Dibi\DriverException::class,
|
||||
'PDO connection in exception or warning error mode is not supported.',
|
||||
);
|
||||
|
||||
|
||||
test('PDO error mode: explicitly set silent', function () {
|
||||
buildPdoDriver(PDO::ERRMODE_SILENT);
|
||||
});
|
||||
test(
|
||||
'PDO error mode: explicitly set silent',
|
||||
fn() => buildPdoDriver(PDO::ERRMODE_SILENT)
|
||||
);
|
||||
|
Reference in New Issue
Block a user