File: 008_db_connect_cached.t

package info (click to toggle)
libdbd-mock-perl 1.43-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 416 kB
  • sloc: perl: 1,135; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 414 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;

use Test::More tests => 5;

BEGIN {
    use_ok('DBD::Mock');  
    use_ok('DBI');  
}

# test that connect cached works as expected.

{
    my $dbh = DBI->connect_cached('DBI:Mock:', 'user', 'pass');
    isa_ok($dbh, 'DBI::db'); 
        
    my $dbh2 = DBI->connect_cached('DBI:Mock:', 'user', 'pass');
    isa_ok($dbh2, 'DBI::db');
    
    is($dbh, $dbh2, '.. these should be the same handles');
}