ajout mode de configuration mixte, tableau ou variable ENV
This commit is contained in:
@@ -7,8 +7,8 @@ use Kletellier\PdoWrapper\Model;
|
||||
use Kletellier\PdoWrapper\QueryBuilder;
|
||||
|
||||
test("create db",function () {
|
||||
$dir = getcwd();
|
||||
$db = Db::init($dir,["default","contwo"]);
|
||||
$config = ["conone" => ["TYPE"=>"sqlite", "DATABASE" => ":memory:" ], "contwo"=>["TYPE"=>"sqlite", "DATABASE" => ":memory:" ]];
|
||||
$db = Db::init($config,["conone","contwo"]);
|
||||
$ret = $db->executeRawQuery("CREATE TABLE test (id INTEGER PRIMARY KEY AUTOINCREMENT, col1 VARCHAR, date1 DATETIME);");
|
||||
expect($ret)->toBe(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user