alongal/testing-database-loader

Import entire database for your own testing purposes.

Installs: 17

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:package

pkg:composer/alongal/testing-database-loader

1.0.0 2018-02-06 03:52 UTC

This package is auto-updated.

Last update: 2025-10-06 02:13:57 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