update test for new api

This commit is contained in:
Colin Kuskie 2006-01-14 04:41:15 +00:00
parent ae3439bb6a
commit 89f60a8e03

View file

@ -12,10 +12,10 @@
use strict; use strict;
use lib '../lib'; use lib '../lib';
use Getopt::Long; use Getopt::Long;
use WebGUI::Session;
use WebGUI::Operation::Help; use WebGUI::Operation::Help;
use WebGUI::International; use WebGUI::International;
use Data::Dumper; use Data::Dumper;
use File::Find;
# ---- END DO NOT EDIT ---- # ---- END DO NOT EDIT ----
#The goal of this test is to make sure that all required labels #The goal of this test is to make sure that all required labels
@ -26,7 +26,7 @@ my $numTests = 0;
my $session = initialize(); # this line is required my $session = initialize(); # this line is required
my @helpFileSet = WebGUI::Operation::Help::_getHelpFilesList(); my @helpFileSet = WebGUI::Operation::Help::_getHelpFilesList($session);
$numTests = scalar @helpFileSet; $numTests = scalar @helpFileSet;
@ -36,9 +36,11 @@ plan tests => $numTests;
diag("Check for mandatory lables for Help table of contents"); diag("Check for mandatory lables for Help table of contents");
diag(Dumper(\@helpFileSet));
foreach my $fileSet (@helpFileSet) { foreach my $fileSet (@helpFileSet) {
my $file = $fileSet->[1]; my $file = $fileSet->[1];
ok(WebGUI::Operation::Help::_getHelpName($file), "Missing label for $file"); ok(WebGUI::Operation::Help::_getHelpName($session, $file), "Missing label for $file");
} }
cleanup($session); # this line is required cleanup($session); # this line is required
@ -52,7 +54,7 @@ sub initialize {
'configFile=s'=>\$configFile 'configFile=s'=>\$configFile
); );
exit 1 unless ($configFile); exit 1 unless ($configFile);
my $session = WebGUI::Session->open("..",$configFile); return WebGUI::Session->open("..",$configFile);
} }
sub cleanup { sub cleanup {