webgui/t/Macro/International.t
Doug Bell ab6f4defe3 - moved Gallery utility methods to WebGUI::Utility::Gallery
- Added tests for GalleryAlbum RSS
- More tests for comments
- Test International Macro sprintf as third+ arguments
- Add Gallery search limiting by user ID
- Remaining i18n for Gallery templates
- Fix: Search form now visible in Photo assets
Moved a lot of stuff from Photo to GalleryFile
2008-03-20 18:51:44 +00:00

67 lines
1.9 KiB
Perl

#-------------------------------------------------------------------
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
#-------------------------------------------------------------------
# Please read the legal notices (docs/legal.txt) and the license
# (docs/license.txt) that came with this distribution before using
# this software.
#-------------------------------------------------------------------
# http://www.plainblack.com info@plainblack.com
#-------------------------------------------------------------------
use FindBin;
use strict;
use lib "$FindBin::Bin/../lib";
use WebGUI::Test;
use WebGUI::Session;
use Data::Dumper;
use Test::More; # increment this value for each test you create
my $session = WebGUI::Test->session;
my @testSets = (
{
input => ['none', 'Asset'],
output => q!None!,
comment => q|explicit namespace|,
},
{
input => ['change url', 'Asset'],
output => q!Change URL!,
comment => q|space in label|,
},
{
input => ['webgui', 'WebGUI'],
output => q!WebGUI!,
comment => q|explicit namespace #2|,
},
{
input => ['webgui', ''],
output => q!WebGUI!,
comment => q|default namespace|,
},
{
input => ['template listFilesForUser title', 'Asset_Gallery', 'plainblack'],
output => q{plainblack's Gallery},
comment => q{Third and more arguments are passed to sprintf()},
},
);
my $numTests = scalar @testSets;
$numTests += 1;
plan tests => $numTests;
my $loaded = use_ok('WebGUI::Macro::International');
SKIP: {
skip 'Module was not loaded, skipping all tests', $numTests -1 unless $loaded;
foreach my $testSet (@testSets) {
my $output = WebGUI::Macro::International::process($session, @{ $testSet->{input} });
is($output, $testSet->{output}, $testSet->{comment} );
}
}