File: 01-constructor.t

package info (click to toggle)
libpgobject-simple-perl 1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 132 kB
  • ctags: 8
  • sloc: perl: 137; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 406 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use PGObject::Simple;
use Test::More tests => 3;
use DBI;

my %hash = (
   foo => 'foo',
   bar => 'baz',
   baz => '2',
   id  => '33',
);

my $dbh = 'test_dbh_fake_value';

my $obj = PGObject::Simple->new(%hash);

ok($obj->isa('PGObject::Simple'), 'Object successfully created');

is($obj->set_dbh($dbh), $dbh, 'Set database handle successfully');
is($dbh, $obj->{_DBH}, "database handle cross check");