Conversation
838b540 to
303d46f
Compare
1ac208e to
9840c31
Compare
|
I do not know where to add tests for this. I dot see any PdoDriver unit test. Should I make one? |
|
If you want, create a test :) |
|
One is never sure enough. |
|
Any elegant way how to create PDO connection from |
| require __DIR__ . '/bootstrap.php'; | ||
|
|
||
| if($config['driver'] !== 'pdo') { | ||
| \Tester\Environment::skip('Only relevant for PDO driver.'); |
There was a problem hiding this comment.
Wanted to use something like:
/**
* @dataProvider ../databases.ini *, pdo
*/However it looks like tester does not support anything like that.
There was a problem hiding this comment.
Maybe use workaround like != foo, pdo
|
|
||
| // PDO error mode: warning | ||
| Assert::exception(function() use ($config) { | ||
| ($pdoConnection = new PDO($config['dsn']))->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); |
|
Great, thanks! |
…rom PDO connection using Dibi internal factories)
| ->getProperty('connection'); | ||
| $connectionProperty->setAccessible(TRUE); | ||
| $pdo = $connectionProperty->getValue($dibiDriver); | ||
| \assert($pdo instanceof PDO); |
There was a problem hiding this comment.
I have tried to rethink a little creation process of PDO connection. As it is quite complex I have delegated it back to \Dibi\Connection.
… unexpected exceptions in ODBC-PDO driver.
see #292