Main > Programming > Libraries >

Test::MockDBI 0.61

Test::MockDBI 0.61

Sponsored Links

Test::MockDBI 0.61 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.019 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 903
Date added: 2007-05-04

Test::MockDBI 0.61 description

Test::MockDBI is Perl module mock DBI interface for testing.

SYNOPSIS

use Test::MockDBI;
OR
use Test::MockDBI qw( :all );

Test::MockDBI::set_dbi_test_type(42);
if (Test::MockDBI::get_dbi_test_type() == 42) {
...

$mock_dbi = get_instance Test::MockDBI;

$mock_dbi->bad_method(
$method_name,
$dbi_testing_type,
$matching_sql);

$mock_dbi->bad_param(
$dbi_testing_type,
$param_number,
$param_value);

$mock_dbi->set_retval_array(
$dbi_testing_type,
$matching_sql,
@retval || CODEREF);
$mock_dbi->set_retval_array(MOCKDBI_WILDCARD, ...

$mock_dbi->set_retval_scalar(
$dbi_testing_type,
$matching_sql,
$retval || CODEREF);
$mock_dbi->set_retval_scalar(MOCKDBI_WILDCARD, ...

$mock_dbi->set_rows(
$dbi_testing_type,
$matching_sql,
$rows || CODEREF);
$mock_dbi->set_rows(MOCKDBI_WILDCARD, ...

Test::MockDBI provides a way to test DBI interfaces by creating rules for changing the DBIs behavior, then examining the standard output for matching patterns.

Testing using Test::MockDBI is enabled by setting the DBI testing type to a non-zero value. This can be done either by using a first program argument of "--dbitest[=TYPE]", or by using the class method Test::MockDBI::set_dbi_test_type(). (Supplying a first argument of "--dbitest[=TYPE]" often works well during testing.) TYPE is a simple integer (/^d+$/). Supplying "--dbitest[=TYPE]" as a first argument works even if no other command-line processing is done, as Test::MockDBI does its own command-line processing to check for this first "--dbitest[=TYPE]" argument.

You will want to add "--dbitest[=TYPE]" during a BEGIN block before the "use Test::MockDBI", so that the mock DBI is initialized as early as possible.

TYPE is optional, as a first argument of "--dbitest" will set the DBI testing type to 1 (one). DBI testing is also disabled by "--dbitest=0" (although this may not be generally useful). The class method Test::MockDBI::set_dbi_test_type() can also be used to set or change the DBI testing type.

Test::MockDBI 0.61 Screenshot

Advertisements

Test::MockDBI 0.61 Keywords

Bookmark Test::MockDBI 0.61

Hyperlink code:
Link for forum:

Test::MockDBI 0.61 Copyright

WareSeeker periodically updates pricing and software information of Test::MockDBI 0.61 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Test::MockDBI 0.61 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Test::More is yet another framework for writing test scripts. Free Download
Thesaurus::DBI is a Perl module that can store and query synonyms (Thesaurus) in an SQL database. Free Download
Test::Deep is a Perl module for extremely flexible deep comparison. Free Download
Test::MockClass is a Perl module to provide mock classes and mock objects for testing. Free Download
Pascal Mock provides a mock library for Delphi/Kylix/FreePascal. Free Download
Email::Store::DBI is a Perl module for database backend to Email::Store. Free Download
Eckbox is software designed to aid in a specific type of security testing against a spying attack known as van Eck Phreaking or Free Download
Test::Simple is a Perl module with basic utilities for writing tests. Free Download