added admin console plugability
This commit is contained in:
parent
4acb862e15
commit
bb4c576f66
1 changed files with 6 additions and 7 deletions
|
|
@ -14,9 +14,9 @@ use warnings;
|
||||||
use lib "$FindBin::Bin/../lib"; ##t/lib
|
use lib "$FindBin::Bin/../lib"; ##t/lib
|
||||||
|
|
||||||
use WebGUI::Test;
|
use WebGUI::Test;
|
||||||
use WebGUI::AdminConsole;
|
|
||||||
use WebGUI::International;
|
use WebGUI::International;
|
||||||
use WebGUI::Session;
|
use WebGUI::Session;
|
||||||
|
use WebGUI::Macro;
|
||||||
|
|
||||||
#The goal of this test is to verify all the i18n labels in
|
#The goal of this test is to verify all the i18n labels in
|
||||||
#the Admin Console functions
|
#the Admin Console functions
|
||||||
|
|
@ -29,9 +29,7 @@ my $lib = WebGUI::Test->lib;
|
||||||
|
|
||||||
# put your tests here
|
# put your tests here
|
||||||
|
|
||||||
my $ac = WebGUI::AdminConsole->new($session);
|
my %consoleFuncs = %{ $session->config->get("adminConsole") };
|
||||||
|
|
||||||
my %consoleFuncs = %{ $ac->getAdminFunction('', 1) };
|
|
||||||
|
|
||||||
|
|
||||||
$numTests = scalar keys %consoleFuncs;
|
$numTests = scalar keys %consoleFuncs;
|
||||||
|
|
@ -41,9 +39,10 @@ plan tests => $numTests;
|
||||||
my $i18n = WebGUI::International->new($session);
|
my $i18n = WebGUI::International->new($session);
|
||||||
|
|
||||||
my ($label, $func);
|
my ($label, $func);
|
||||||
while ( ($label, $func) = each %consoleFuncs ) {
|
foreach my $key (keys %consoleFuncs ) {
|
||||||
ok($i18n->get(@{ $func->{title} }{qw(id namespace )} ),
|
my $label = $consoleFuncs{$key}{title};
|
||||||
sprintf "The title for %s, tag: %s, namespace: %s exists", $label, @{ $func->{title} }{'id', 'namespace'});
|
WebGUI::Macro::process($session, \$label);
|
||||||
|
isnt($label,'', "admin console func $key: ".$consoleFuncs{$key}{title});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue