Query: bio::chado::schema::test
OS: debian
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
Bio::Chado::Schema::Test(3pm) User Contributed Perl Documentation Bio::Chado::Schema::Test(3pm)NAMEBio::Chado::Schema::Test - Library to be used by Bio::Chado::Schema test scripts.SYNOPSISuse lib qw(t/lib); use Bio::Chado::Schema::Test; use Test::More; my $schema = Bio::Chado::Schema::Test->init_schema();DESCRIPTIONThis module provides the basic utilities to write tests against Bio::Chado::Schema.METHODSinit_schema my $schema = Bio::Chado::Schema::Test->init_schema( deploy => 1, populate => 1, storage_type => '::DBI::Replicated', storage_type_args => { balancer_type=>'DBIx::Class::Storage::DBI::Replicated::Balancer::Random' }, ); This method removes the test SQLite database in t/var/BCS.db and then creates a new, empty database. This method will call deploy_schema() by default, unless the deploy flag is set to 0. This method will call populate_schema() if the populate argument is set to a true value. has_custom_dsn Returns true if the BCS_TEST_DSN environment variable is set. deploy_schema Bio::Chado::Schema::Test->deploy_schema( $schema ); This method does one of two things to the schema. It can either call the experimental $schema->deploy() if the BCSTEST_SQLT_DEPLOY environment variable is set, otherwise the default is to read in the t/lib/sqlite.sql file and execute the SQL within. Either way you end up with a fresh set of tables for testing. populate_schema Bio::Chado::Schema::Test->populate_schema( $schema ); After you deploy your schema you can use this method to populate the tables with test data. perl v5.14.2 2011-11-08 Bio::Chado::Schema::Test(3pm)
Similar Topics in the Unix Linux Community |
---|
Unix Test |
Test condition |
perl, testing a database for a match |
Toad for Oracle 11G Schema browser |
TRIM a string in shell script |