NAME
DBICTest - Library to be used by DBIx::Class test scripts.
SYNOPSIS
use lib qw(t/lib);
use DBICTest;
use Test::More;
my $schema = DBICTest->init_schema();
DESCRIPTION
This module provides the basic utilities to write tests against DBIx::Class.
METHODS
init_schema
my $schema = DBICTest->init_schema(
no_deploy=>1,
no_populate=>1,
);
This method removes the test SQLite database in t/var/DBIxClass.db and then creates a new, empty database.
This method will call deploy_schema() by default, unless the no_deploy flag is set.
Also, by default, this method will call populate_schema() by default, unless the no_deploy or no_populate flags are set.
deploy_schema
DBICTest->deploy_schema( $schema );
clear_schema
DBICTest->clear_schema( $schema );
populate_schema
DBICTest->populate_schema( $schema );
After you deploy your schema you can use this method to populate the tables with test data.