ported t/A-M to use WebGUI::Test
This commit is contained in:
parent
3f6176397b
commit
831f5a36e1
14 changed files with 67 additions and 315 deletions
30
t/Help/toc.t
30
t/Help/toc.t
|
|
@ -8,15 +8,15 @@
|
|||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
# ---- BEGIN DO NOT EDIT ----
|
||||
use FindBin;
|
||||
use strict;
|
||||
use lib '../../lib';
|
||||
use Getopt::Long;
|
||||
use lib "$FindBin::Bin/../lib";
|
||||
|
||||
use WebGUI::Test;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Operation::Help;
|
||||
use WebGUI::International;
|
||||
use Data::Dumper;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
||||
#The goal of this test is to make sure that all required labels
|
||||
#for the help system exist.
|
||||
|
|
@ -24,7 +24,7 @@ use Data::Dumper;
|
|||
use Test::More; # increment this value for each test you create
|
||||
my $numTests = 0;
|
||||
|
||||
my $session = initialize(); # this line is required
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
my @helpFileSet = WebGUI::Operation::Help::_getHelpFilesList($session);
|
||||
|
||||
|
|
@ -40,23 +40,3 @@ foreach my $fileSet (@helpFileSet) {
|
|||
my $file = $fileSet->[1];
|
||||
ok(WebGUI::Operation::Help::_getHelpName($session, $file), "Missing label for $file");
|
||||
}
|
||||
|
||||
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);
|
||||
return WebGUI::Session->open("../..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue