first round at fixing tests to work with new session system

This commit is contained in:
JT Smith 2006-01-12 22:49:38 +00:00
parent a3adaee3a0
commit 20a4aebb13
15 changed files with 160 additions and 161 deletions

View file

@ -13,7 +13,6 @@ use strict;
use lib '../lib';
use Text::Balanced qw(extract_codeblock);
use Getopt::Long;
use WebGUI::Session;
use WebGUI::Operation::Help;
use WebGUI::International;
use Data::Dumper;
@ -26,7 +25,7 @@ use File::Find;
use Test::More; # increment this value for each test you create
my $numTests = 0;
initialize(); # this line is required
my $session = initialize(); # this line is required
# put your tests here
@ -118,7 +117,7 @@ foreach my $i18n ( @objLabels ) {
sprintf "label: %s->%s inside %s", @{ $i18n }{'namespace', 'label', 'file', });
}
cleanup(); # this line is required
cleanup($session); # this line is required
sub label_finder_pm {
next unless /\.pm$/;
@ -228,16 +227,17 @@ sub getSQLLabels {
# ---- 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);
$|=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();
}