App-Prove-Plugin-KohaBootstrap

 view release on metacpan or  search on metacpan

lib/App/Prove/Plugin/KohaBootstrap.pm  view on Meta::CPAN

    C4::Installer->import;

    require C4::Languages;

    my $host = C4::Context->config('hostname');
    my $port = C4::Context->config('port');
    my $database = C4::Context->config('database');
    my $user = C4::Context->config('user');
    my $pass = C4::Context->config('pass');

    say "Create test database $database...";

    my $dbh = DBI->connect("dbi:mysql:;host=$host;port=$port", $user, $pass, {
        RaiseError => 1,
        PrintError => 0,
    });

    $dbh->do("DROP DATABASE IF EXISTS $database");
    $dbh->do("CREATE DATABASE $database");

    my $installer = C4::Installer->new();



( run in 0.488 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )