alongal / testing-database-loader
导入整个数据库以供您进行自用测试。
1.0.0
2018-02-06 03:52 UTC
Requires
- php: >=5.4
Requires (Dev)
- phpunit/phpunit: ^4.8
This package is auto-updated.
Last update: 2024-09-05 23:30:15 UTC
README
这是一个简单的类,可以将整个SQL导出文件加载到您所需的数据库中。
如何使用
$db = (new \alongal\ImportDb([ 'path_to_mysql_engine' => '/Applications/XAMPP/xamppfiles/bin/mysql', 'path_to_file_to_load_folder' => realpath(__DIR__ . '/..') . '/tests/', 'db_name' => 'test_db', ])) ->setDebugMode(false) ->dropDbIfExists(true) ->loadFile('test_db_001.sql');
欢迎联系我: alondagal@gmail.com 或 @galalon2