diff --git a/README.md b/README.md index d909ed6..06aacc2 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,8 @@ Completely framework-agnostic and database-agnostic. ```php // $db = new PDO('mysql:dbname=my-database;host=localhost;charset=utf8mb4', 'my-username', 'my-password'); -// $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); +// or +// $db = new \Delight\Db\PdoDsn('mysql:dbname=my-database;host=localhost;charset=utf8mb4', 'my-username', 'my-password'); $auth = new \Delight\Auth\Auth($db); ``` diff --git a/tests/index.php b/tests/index.php index 4c22c00..b7dcccd 100644 --- a/tests/index.php +++ b/tests/index.php @@ -20,7 +20,6 @@ header('Content-type: text/html; charset=utf-8'); require __DIR__.'/../vendor/autoload.php'; $db = new PDO('mysql:dbname=php_auth;host=127.0.0.1;charset=utf8mb4', 'root', ''); -$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $auth = new \Delight\Auth\Auth($db);