alongal/testing-database-loader

Import entire database for your own testing purposes.

1.0.0 2018-02-06 03:52 UTC

This package is auto-updated.

Last update: 2024-05-05 22:46:30 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