Merge branch 'master' into 8-merge
Conflicts: docs/gotcha.txt docs/upgrades/upgrade_7.9.8-7.9.9.pl lib/WebGUI.pm lib/WebGUI/Asset.pm lib/WebGUI/Asset/Template.pm lib/WebGUI/Asset/Wobject/Calendar.pm lib/WebGUI/Asset/Wobject/Carousel.pm t/Asset/Asset.t t/Mail/Send.t t/Session/Url.t t/lib/WebGUI/Test.pm
This commit is contained in:
commit
cd1e450c32
1229 changed files with 499 additions and 313891 deletions
|
|
@ -20,11 +20,7 @@ use WebGUI::Content::SetLanguage;
|
|||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
my $numTests = 1; ##For conditional load check
|
||||
my $langTests = 4; ##For language look-up tests
|
||||
$numTests += 20 + $langTests;
|
||||
|
||||
plan tests => $numTests;
|
||||
plan tests => 25;
|
||||
|
||||
my $loaded = use_ok('WebGUI::International');
|
||||
|
||||
|
|
@ -45,12 +41,8 @@ is($i18n->getNamespace(), 'Asset', 'getNamespace: set namespace to Asset');
|
|||
is($i18n->get('topicName'), 'Assets', 'get: get English label for topicName in Asset: Assets');
|
||||
is($i18n->get('topicName', 'WebGUI'), 'WebGUI', 'get: test manual namespace override');
|
||||
|
||||
installPigLatin();
|
||||
WebGUI::Test->addToCleanup(sub {
|
||||
unlink File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n PigLatin WebGUI.pm/);
|
||||
unlink File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n PigLatin.pm/);
|
||||
rmdir File::Spec->catdir(WebGUI::Test->lib, qw/WebGUI i18n PigLatin/);
|
||||
});
|
||||
local @INC = @INC;
|
||||
unshift @INC, File::Spec->catdir( WebGUI::Test->getTestCollateralPath, 'International', 'lib' );
|
||||
|
||||
#tests for sub new
|
||||
my $i18nNew1 = WebGUI::International->new($session);
|
||||
|
|
@ -66,8 +58,6 @@ my $languages = $i18n->getLanguages();
|
|||
|
||||
my $gotPigLatin = exists $languages->{PigLatin};
|
||||
|
||||
SKIP: {
|
||||
skip 'No PigLatin language pack for testing', $langTests unless $gotPigLatin;
|
||||
is(
|
||||
$i18n->get('account','WebGUI','English'),
|
||||
$i18n->get('account','WebGUI','PigLatin'),
|
||||
|
|
@ -94,8 +84,6 @@ SKIP: {
|
|||
'keys with spaces work'
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
is($i18n->getLanguage('English', 'label'), 'English', 'getLanguage, specific property');
|
||||
|
||||
isa_ok($i18n->getLanguage('English'), 'HASH', 'getLanguage, without a specific property returns a hashref');
|
||||
|
|
@ -119,16 +107,4 @@ is(
|
|||
'Language check after SetLanguage contentHandler : key from missing file return English key'
|
||||
);
|
||||
|
||||
sub installPigLatin {
|
||||
mkdir File::Spec->catdir(WebGUI::Test->lib, 'WebGUI', 'i18n', 'PigLatin');
|
||||
copy(
|
||||
WebGUI::Test->getTestCollateralPath('WebGUI.pm'),
|
||||
File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n PigLatin WebGUI.pm/)
|
||||
);
|
||||
copy(
|
||||
WebGUI::Test->getTestCollateralPath('PigLatin.pm'),
|
||||
File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n PigLatin.pm/)
|
||||
);
|
||||
}
|
||||
|
||||
#vim:ft=perl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue