first round at fixing tests to work with new session system
This commit is contained in:
parent
a3adaee3a0
commit
20a4aebb13
15 changed files with 160 additions and 161 deletions
24
t/SQL.t
24
t/SQL.t
|
|
@ -12,7 +12,6 @@
|
|||
use strict;
|
||||
use lib '../lib';
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use Data::Dumper;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
||||
|
|
@ -20,7 +19,7 @@ use Data::Dumper;
|
|||
use Test::More tests => 33; # increment this value for each test you create
|
||||
use WebGUI::SQL;
|
||||
|
||||
initialize(); # this line is required
|
||||
my $session = initialize(); # this line is required
|
||||
|
||||
# read
|
||||
ok(my $sth = WebGUI::SQL->read("select * from settings"), "read()");
|
||||
|
|
@ -149,22 +148,23 @@ is($getRow->{nextValue}, 47, "getRow()");
|
|||
WebGUI::SQL->write("delete from incrementer where incrementerId=".quote($setRowId));
|
||||
|
||||
|
||||
cleanup(); # this line is required
|
||||
cleanup($session); # this line is required
|
||||
|
||||
|
||||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
||||
sub initialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
nitialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue