alongal / testing-database-loader
Import entire database for your own testing purposes.
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:package
Requires
- php: >=5.4
Requires (Dev)
- phpunit/phpunit: ^4.8
This package is auto-updated.
Last update: 2025-01-06 00:23:15 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