alongal / testing-database-loader
Import entire database for your own testing purposes.
Package info
github.com/alongal/testing-database-loader
Type:package
pkg:composer/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: 2026-03-06 02:56:44 UTC
README
This is a simple class that loads an entire sql dump file into your required database.
How To Use
$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');
Feel free to contact me: alondagal@gmail.com or @galalon2